我正在尝试将我的解决方案中的一个Web项目部署到服务器.我在TeamCity上使用msbuild就像这样:
msbuild MySolution.sln /t:WebSite:Rebuild /p:DeployOnBuild=True /p:PublishProfile=Prod ...
Run Code Online (Sandbox Code Playgroud)
但是,当我运行它时,msbuild仍然尝试构建我的WebService项目,即使我的WebSite项目不依赖它(但它确实依赖于Services项目也在解决方案中).如何只发布一个项目,又称公正WebSite?
我也尝试使用构建项目文件
msbuild WebSite/WebSite.csproj /p:DeployOnBuild=True ...
Run Code Online (Sandbox Code Playgroud)
但它然后抱怨它无法恢复包:
[07:47:17]WebSite\WebSite.csproj.teamcity: Build target: Build
[07:47:17][WebSite\WebSite.csproj.teamcity] RestorePackages
[07:47:17][RestorePackages] Exec
[07:47:17][Exec] C:\TeamCity\buildAgent\work\cab8a3d752df3a51\.nuget\NuGet.targets(90, 15): error MSB4064: The "LogStandardErrorAsError" parameter is not supported by the "Exec" task. Verify the parameter exists on the task, and it is a settable public instance property.
[07:47:17][Exec] C:\TeamCity\buildAgent\work\cab8a3d752df3a51\.nuget\NuGet.targets(89, 9): error MSB4063: The "Exec" task could not be initialized with its input parameters.
[07:47:17][WebSite\WebSite.csproj.teamcity] Project WebSite\WebSite.csproj.teamcity failed. …Run Code Online (Sandbox Code Playgroud)