2

When publishing a web application with msbuild command line utility, I specify a publish profile name like "dev", which corresponds to the "dev.pubxml" file in the project's Properties/PublishProfiles directory. The file contains setting for publishing to our development environment.

By default, the XML node at Project/PropertyGroup/LaunchSiteAfterPublish contains a value of "True". Is there a way I can set it to false via the command line, or will I have to write a script in my build engine to edit the XML file before calling msbuild?


Why I want to do this: If I'm publishing from Visual Studio, I want it to open the web page for testing. If the build is automated and running from the command line, then I don't want the build automation system to open the web page.

Triynko
  • 18,766
  • 21
  • 107
  • 173

1 Answers1

2

From the commandline you can pass the publish profile & any properties that you wish to override. e.g in this case: msbuild <proj>.csproj /p:PublishProfile=dev /p:LaunchSiteAfterPublish=false

vijayrkn
  • 461
  • 4
  • 7