我面临一个问题,需要从Visual Studio Online的解决方案中构建两个Web项目之一。
- 我没有找到如何使用“Visual Studio Build”步骤构建单个项目。
如果有这样一种方法可以使用“Visual Studio Build”步骤来完成,那就太好了。
- 我还尝试使用“MSBuild”步骤。不幸的是,在使用Nuget恢复包时出现了问题。运行完Nuget.exe restore Myproj.csproj后,我收到以下错误消息:##[error]No file format header found, ##[error]Unexpected exit code 1 returned from tool NuGet.exe。
总结:
如何从Visual Studio Online中的多个Web项目的解决方案中构建一个Web项目?
更新
这里是我构建时出现的错误图像。我使用“Visual Studio Build”步骤或“MSBuild”步骤时都会遇到此问题。
另外
我在VSO问题中找到了chrisrpatterson的评论: https://github.com/Microsoft/vso-agent-tasks/issues/571
他说:你不能对除SLN文件以外的任何东西运行nuget restore。您应该取消选中vsbuild任务上的“还原nuget包”。
但我需要这些软件包,而且我不想将packages文件夹推送到我的存储库中。
那么,如何在“Visual Studio Build”步骤中恢复软件包并仅运行我的解决方案中的一个Web项目?