首页
学习
活动
专区
工具
TVP
发布
社区首页 >问答首页 >NuGet在生成时不恢复包

NuGet在生成时不恢复包
EN

Stack Overflow用户
提问于 2013-12-24 20:53:14
回答 7查看 50.9K关注 0票数 26

我刚刚在一台新机器上创建了一个工作区,从TFS获取了我们项目的最新信息,启用了NuGet恢复,并得到了以下输出:

代码语言:javascript
复制
1>------ Rebuild All started: Project: Caching, Configuration: Debug Any CPU ------
1>  Restoring NuGet packages...
1>  To prevent NuGet from downloading packages during build, open the Visual Studio Options dialog, click on the Package Manager node and uncheck 'Allow NuGet to download missing packages'.
1>  All packages listed in packages.config are already installed.
1>  Caching Framework -> C:\MyProjLocation\Caching\bin\Debug\Caching.dll
2>------ Rebuild All started: Project: Library, Configuration: Debug Any CPU ------
2>C:\Program Files (x86)\MSBuild\12.0\bin\Microsoft.Common.CurrentVersion.targets(1635,5): warning MSB3245: Could not resolve this reference. Could not locate the assembly "LumenWorks.Framework.IO". Check to make sure the assembly exists on disk. If this reference is required by your code, you may get compilation errors.
2>C:\MyProjLocation\Library\SomeClass.cs(2,7,2,17): error CS0246: The type or namespace name 'LumenWorks' could not be found (are you missing a using directive or an assembly reference?)

========== Rebuild All: 1 succeeded, 1 failed, 0 skipped ==========

没有恢复任何NuGet包(有超过10个-出于可读性的考虑,我从上面的输出中删除了它们)。

看起来NuGet甚至没有尝试恢复第二个项目(库)的包。

我已经尝试将NuGet目标导入移动到Library.csproj文件as mentioned here中的CSharp目标导入下,但仍然不起作用:

代码语言:javascript
复制
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<Import Project="$(SolutionDir)\.nuget\NuGet.targets" Condition="Exists('$(SolutionDir)\.nuget\NuGet.targets')" />

我在Visual Studio2013上运行最新版本的NuGet (2.7.41101.371)。

编辑: packages.config存在,并且NuGet包管理器用正确的包标记了库项目。

EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/20761322

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档