简体   繁体   中英

Nuget looking in “\.nuget\packages” for local project

I'm working on an app with several projects in the solution. Project-1 builds fine and Project-2 references it within the same solution. When I open the references to Project-2, I see the Project-1 reference. I can go to the path specified and I see the Project-1 dll there.

When I try to build Project-2, I get the error

The package Project-1 could not be found in C:\Users\[it me]\.nuget\packages. 
Run a NuGet package restore to download the package.

Both projects are set to the same architecture (x64), not "Any CPU". Why is Project-2 looking for Project-1 in the nuget packages folder instead of the path specified?

The problem, as it turned out, was a versioning problem. Project-1 had a lower target version than Project-2 (which was targeted for the Windows 10 Anniversary Build 14393). I installed Visual Studio 2015 Update 3, which includes the 14393 APIs, and that resolved the problem.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM