7

I am deploying my web application from command line using this

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

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

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

Thanks

2
  • 1
    Can you be more specific about the "name that is using in project settings page"? A Screenshot would help. Commented May 16, 2012 at 10:02
  • do you mean the assembly name? or the web application name? Commented May 16, 2012 at 10:41

3 Answers 3

19

You should try this

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

You could get more about these keywords in your project file(.csproj), open it in notepad and search for the default name that is setted by VS. and use that parameter in your command line.

Hope this helps.

Sign up to request clarification or add additional context in comments.

1 Comment

As for now, there's no way to set DeployIISAppPath for asp.net mvc apps in visual studio. This build option works great!
0

MS Build Command line parameters : it doesn't look like you can do it from the command line.

But you can do it in your config file - article using a property group

 <PropertyGroup>
     <appname>NewApplicationName</appname>
 </PropertyGroup>

1 Comment

No, it still sets the same namne that is mentioned in the project properties Package/Publish Web page
0

I can't tell exactly what setting it is in the property pages that you are talking about however the syntax will be something like this:

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

1 Comment

No, it still sets the same namne that is mentioned in the project properties Package/Publish Web page

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.