Set the application name in MSBuild options

I am deploying my web application from the command line using this

msbuild WebApplication1.csproj / t: Package / p: configuration = release

It works fine, but the application is deployed with the same name that is used on the project settings page.

I want to set the name of the deployed application using the same command line. Is there any parameter in msbuild for this or any other approach.

thanks

+7
source share
3 answers

You have to try this

msbuild WebApplication1.csproj / t: Package / p: configuration = release; DeployIISAppPath = "what_ever_name_you_want"

You can get more about these keywords in the project file (.csproj), open it in notepad and find the default name set by VS. and use this option on the command line.

Hope this helps.

+19
source

MS Build Command Line Parameters : It looks like you cannot do this from the command line.

But you can do this in your configuration file - article using the property group

<PropertyGroup> <appname>NewApplicationName</appname> </PropertyGroup> 
0
source

I can’t say exactly what parameter it is on the property pages you are talking about, but the syntax will be something like this:

msbuild WebApplication1.csproj / t: Package / p: configuration = release / p: appname = Test

0
source

All Articles