How to Publish an asp.net application using devenv build runner
I have a solution that includes an ASP.Net web application. In the project file I have set DeployOnBuild = True as follows:
<Target Name="AfterBuild">
<!--The following forces the project to Publish after building-->
<MSBuild Condition="'$(DeployOnBuild)'!='true'" Projects="$(MSBuildProjectFullPath)" Properties="DeployOnBuild=true;PublishProfile=FolderProfile;BuildingInsideVisualStudio=False" />
</Target>
When I build using visual studio 2022 the publish folder gets generated a files copied. When I build in Teamcity using the devenv build runner the publish folder is not generated. How do I get the publish to run using devenv?
Thanks
Please sign in to leave a comment.
Hi Nbell,
To get the publish, use the .NET runner(https://www.jetbrains.com/help/teamcity/net.html#msbuild) in TeamCity and configure it with the following MSBuild command-line parameters:
/p:DeployOnBuild=true /p:PublishProfile=FolderProfile.xml
If this does not address your issue, please share your specific goal so we can provide detailed assistance tailored to your needs.