[英]Visual Studio not finding NuGet packages relative to solution
So I have a visual studio solution that includes a project that is a library which depends on some NuGet package, and a project that depends on the library. 因此,我有一个Visual Studio解决方案,其中包括一个项目,该项目是依赖于某些NuGet程序包的库,以及一个依赖于该库的项目。 Whenever I build, it restores packages to the solution directory, and then tells me the library project can't find the NuGet packages.
每当我构建时,它都会将软件包还原到解决方案目录,然后告诉我图书馆项目找不到NuGet软件包。 How do I either get them to download to the project directory, or tell the project to look for the NuGet packages in the solution directory?
我如何让它们下载到项目目录,或告诉项目在解决方案目录中寻找NuGet软件包?
I'm using Visual Studio 2015, and the projects are both in C++ 我正在使用Visual Studio 2015,并且两个项目都在C ++中
Here's the error it shows: 这是它显示的错误:
Restoring NuGet packages...
To prevent NuGet from restoring packages during build, open the Visual Studio Options dialog, click on the Package Manager node and uncheck 'Allow NuGet to download missing packages during build.'
NuGet package restore finished.
1>------ Build started: Project: GameLibrary, Configuration: Debug x64 ------
1>Build started 1/14/2017 3:44:05 PM.
1> 1>
1>C:\Users\luis\Documents\Visual Studio 2015\Projects\TheGameOfGames\external\GameLibrary\projects\visualstudio\GameLibrary.vcxproj(345,5): error : This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is packages\libjpeg.redist.9.0.1.4\build\native\libjpeg.redist.targets.
1>
1>Build FAILED.
1>
1>Time Elapsed 00:00:00.20
所以我设法通过在notepad ++中编辑库vcxproj并将所有以packages /开头的包的引用更改为$(SolutionDir)packages /来解决此问题。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.