MVC4 vanilla project no appveyor.yml starts to build but cannot find EntityFramework?

mike's Avatar

mike

Jul 10, 2014 @ 03:56 AM

Just trying things out.. it's looking cool and I want it to work, but something is amiss. brand new vanially MVC4 using EF5. got sln and project folder

SLN
folder\ folder\folder.proj solution.sln

simple as it get or so i think, i tried no YML and with YML same results, lots of errors on dependencies.

ResolveAssemblyReferences:
18 Primary reference "EntityFramework".
19C:\Program Files (x86)\MSBuild\12.0\bin\Microsoft.Common.CurrentVersion.targets(1696,5): warning MSB3245: Could not resolve this reference. Could not locate the assembly "EntityFramework". Check to make sure the assembly exists on disk. If this reference is required by your code, you may get compilation errors. [C:\projects\strong-cms\src\Strong.CMS.Sites\Strong.CMS.Sites.csproj]
20 For SearchPath "{HintPathFromItem}".
21 Considered "..\packages\EntityFramework.5.0.0\lib\net45\EntityFramework.dll", but it didn't exist.
22 For SearchPath "{TargetFrameworkDirectory}".
23 Considered "C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETFramework\v4.5.1\EntityFramework.winmd", but it didn't exist.
24 Considered "C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETFramework\v4.5.1\EntityFramework.dll", but it didn't exist.

.... etc....

so i tried

before_build:
nuget restore

but alas, no go. anyone else same issue? any pointers?

  1. Support Staff 1 Posted by Feodor Fitsner on Jul 10, 2014 @ 04:51 AM

    Feodor Fitsner's Avatar

    Try specifying a solution in nuget restore command, like:

    nuget restore folder\folder\solution.sln
    

    where solution path is relative from repository root.

  2. 2 Posted by mike on Jul 10, 2014 @ 06:56 AM

    mike's Avatar

    yea, tried that already, says all packages already exist. tried moving the SLN from root down 1 level into subfolder, and reference to SLN in subfolder. same..

    other thoughts?

    nuget restore Strong.CMS.sln
    5All packages listed in packages.config are already installed.
    6msbuild "Strong.CMS.sln" /logger:"C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll"
    7Microsoft (R) Build Engine version 12.0.30501.0
    8[Microsoft .NET Framework, version 4.0.30319.34209]
    9Copyright (C) Microsoft Corporation. All rights reserved.
    10
    11Building the projects in this solution one at a time. To enable parallel build, please add the "/m" switch.
    12Build started 7/10/2014 6:54:30 AM.
    13Project "C:\projects\strong-cms\Strong.CMS.sln" on node 1 (default targets).
    14ValidateSolutionConfiguration:
    15 Building solution configuration "debug|Any CPU".
    16Project "C:\projects\strong-cms\Strong.CMS.sln" (1) is building "C:\projects\strong-cms\Strong.CMS.Sites\Strong.CMS.Sites.csproj" (2) on node 1 (default targets).
    17ResolveAssemblyReferences:
    18 Primary reference "EntityFramework".
    19C:\Program Files (x86)\MSBuild\12.0\bin\Microsoft.Common.CurrentVersion.targets(1696,5): warning MSB3245: Could not resolve this reference. Could not locate the assembly "EntityFramework". Check to make sure the assembly exists on disk. If this reference is required by your code, you may get compilation errors. [C:\projects\strong-cms\Strong.CMS.Sites\Strong.CMS.Sites.csproj]
    20 For SearchPath "{HintPathFromItem}".
    21 Considered "..\packages\EntityFramework.6.1.1\lib\net45\EntityFramework.dll", but it didn't exist.
    22 For SearchPath "{TargetFrameworkDirectory}".
    23 Considered "C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETFramework\v4.5.1\EntityFramework.winmd", but it didn't exist.
    24 Considered "C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETFramework\v4.5.1\EntityFramework.dll", but it didn't exist.
    25 Considered "C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETFramework\v4.5.1\EntityFramework.exe", but it didn't exist.

  3. Support Staff 3 Posted by Feodor Fitsner on Jul 10, 2014 @ 07:24 AM

    Feodor Fitsner's Avatar

    Why is it looking for packages\EntityFramework.5.0.0 in the first place and then packages\EntityFramework.6.1.1?

    Don't you have packages checked-in in your repository by chance?

  4. 4 Posted by mike on Jul 10, 2014 @ 03:09 PM

    mike's Avatar

    i tried upgrading from EF5 to EF6, so that's why in 2nd post it's 6.1.1.

    yes, i have packages checked in, but my packages were missing DLLs.

    i deleted the packages folder, ensured "allow nuget to download missing packages" and "automatically check for missing packages during build in Visual studio". it re-download the packages, and this time had the DLLs.

    then i had to "git add -f ." to force add the DLLs to github. now it builds..

    but, why do i need to have DLLs in my repo? it slows down the clone and build some time.

    this command:

    nuget restore Strong.CMS.sln
    All packages listed in packages.config are already installed.

    says packages are installed, so i don't know why it would located them

    Primary reference "EntityFramework".
    19C:\Program Files (x86)\MSBuild\12.0\bin\Microsoft.Common.CurrentVersion.targets(1696,5): warning MSB3245: Could not resolve this reference. Could not locate the assembly "EntityFramework". Check to make sure the assembly exists on disk. If this reference is required by your code, you may get compilation errors. [C:\projects\strong-cms\Strong.CMS.Sites\Strong.CMS.Sites.csproj]
    20 For SearchPath "{HintPathFromItem}".

    is there an environment variable or powershell variable to set to help msbuild locate the already install packages?? where are the packages located from the nuget restore?

    do you have RDC feature for us to log into a VM for 30 minutes after a build to look at things? CircleCI has an ssh feature, so would be nice-to-have to remote in.

  5. Support Staff 5 Posted by Feodor Fitsner on Jul 11, 2014 @ 05:20 AM

    Feodor Fitsner's Avatar

    That's the whole point of NuGet - do not store dependencies in repository. Just completely remove entire "packages" folder from your repository and it will be restoring packages during the build. If you have NuGet packages restore enabled in VusualStudio (.nuget folder exists) then you are good to go without "nuget restore" command.

    See this article for more details: http://docs.nuget.org/docs/reference/package-restore

    - Feodor

  6. Ilya Finkelshteyn closed this discussion on Aug 25, 2018 @ 01:45 AM.

Comments are currently closed for this discussion. You can start a new one.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac