[英]Automatic Nuget package restore in Visual Studio Online fails
I've verified that it works locally by deleting all of the packages from the packages folder, opening up visual studio and then building my project - all of the packages are downloaded first and then it builds. 我已经通过从packages文件夹中删除所有软件包,打开Visual Studio然后构建我的项目来验证它在本地是否有效-首先下载所有软件包,然后进行构建。
I do not have a .nuget folder and in the visual studio options I've allowed Nuget to download missing packages. 我没有.nuget文件夹,在Visual Studio选项中,我允许Nuget下载缺少的软件包。
When building using TFS I get a ton of errors that I do not get when building locally. 使用TFS进行构建时,会出现很多错误,而在本地构建时不会出现。 I believe this to be related to
我相信这与
Thoughts? 有什么想法吗?
I had the same problem when building a new project with Visual Studio Online and found this solution : 使用Visual Studio Online构建新项目时,我遇到了同样的问题,并找到了以下解决方案 :
NuGet should restore the local packages when you build and will also restore after VSO build. NuGet应该在构建时还原本地软件包,并且在VSO构建后也将还原。 Version control will not have a packages folder, but the required packages end up on the release server.
版本控制将没有程序包文件夹,但是所需的程序包最终在发行服务器上。 I trigger a release manager with each build and deploy with DSC.
我在每次构建时都触发一个发布管理器,并使用DSC进行部署。
NuGet documentation ( 1 & 2 )doesn't explain how that works and I've had to 'toggle' this on & off once to get builds to work after. NuGet文档( 1和2 )没有解释它是如何工作的,我不得不一次又一次地“切换”此选项以使构建工作。 I've emailed support@nuget.org to ask for more detail and clearer documentation.
我已发送电子邮件至support@nuget.org,要求提供更多详细信息和更清晰的文档。
You should not have to checkin packages to source control. 您无需检入包即可进行源代码管理。 But you'll need to help MSBuild restoring that.
但是您需要帮助MSBuild还原它。
Check this link: http://docs.nuget.org/docs/reference/package-restore-with-team-build 检查此链接: http : //docs.nuget.org/docs/reference/package-restore-with-team-build
The trick is the MSBuild .proj file you have to create and reference there your solutions. 诀窍是必须创建MSBuild .proj文件并在其中引用您的解决方案。
Nuget 2.7 is required 需要Nuget 2.7
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.