我已经阅读了许多有关使用各种版本的Visual Studio从TeamCity发布的文章。我目前正在使用TeamCity和Visual Studio 2015的9.1.7版。
我在办理登机手续时有3个构建步骤:
当我检入文件时,我收到一条“测试通过”成功消息:
从这里我可以看出有些不对劲,因为我希望它对发布有所帮助。当我查看构建日志时,会看到以下内容:
[12:48:22] [API \ API.sln]发布[12:48:22] [发布] MSBuild [12:48:22] [MSBuild] API \ API \ API.csproj:构建目标:发布[12 :48:22] [API \ API \ API.csproj] _DeploymentUnpublishable
我的发布构建步骤是通过以下方式设置的:
In my API project in Visual Studio I can publish to the correct location on the network. Here is my publish profile:
I'm not sure what I'm missing. I'm expecting the Publishing build step to work like when I click the Build->Publish menu item in Visual Studio.
I'm guessing that I'm missing something or misunderstanding what the publishing build step is supposed to do.
Any help is appreciated.
I was able to get it to work after days and days of searching. I found part of the answer here on Stack Overflow. The trick was to get it to work from the MSBuild Command Line:
C:\TFS\project\myProject\APIproject>msbuild apiproject.csproj /p:DeployOnBuild=true /p:PublishProfile="Properties\PublishProfiles\DEV.pubxml" /p:VisualStudioVersion=14.0
一旦运行几次,便可以在Team City中创建一个构建步骤(请参阅此问题/答案),然后进行以下设置:
<location of the apiproject.csproj>
/p:DeployOnBuild=true /p:PublishProfile= "C:\TFS\API\API\Properties\PublishProfiles\DEV.pubxml" /p:VisualStudioVersion=14.0
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句