Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8985105
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T21:15:36+00:00 2026-06-15T21:15:36+00:00

I have two MVC 3 web projects one for a mobile application and the

  • 0

I have two MVC 3 web projects one for a mobile application and the other is the regular desktop web application, the last to be added was the mobile application, I have a build definition that deploys every time I check in the code (gated check in).

My problem is that since I have added the mobile the build definition takes that project as a default, so I’d like to know if I can specify “a default web project” in this case I’d like to deploy the desktop version instead the mobile.

I’d like to know if I can specify that from the build arguments, the configuration is the following:

/p:Configuration=Dev /p:Platform=”Any CPU” /p:DeployOnBuild=true /p:DeployTarget=MSDeployPublish /p:MSDeployPublishMethod=WMSVC /p:MsDeployServiceUrl=https://IP:Port/msdeploy.axd /p:username=xxx /p:password=xxx /p:AllowUntrustedCertificate=True /p:DeployIisAppPath=Path

and in the “projects to build” option I have the solution of the project (sln file)

any ideas?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T21:15:37+00:00Added an answer on June 15, 2026 at 9:15 pm

    Instead of adding the additional properties to the MSBuild command line, edit the project file and set the properties inside the project file. If needed, create a specific Configuration to put these in so that the deployment doesn’t always happen in Visual Studio.

     <PropertyGroup Condition="'$(BuildingInsideVisualStudio)' == false">
          <DeployOnBuild>true</DeployOnBuild>
          <MSDeployTarget>MSDeployPublish</MSDeployTarget>
          ....
          ....
     </PropertyGroup>
    

    That way the project file will know when to deploy. If needed you can stick these items inside the Dev|AnyCPU PropertyGroup which is already present, but that way it will always build inside Visual Studio.

    To be able to trigger deployment through the command line, you must make sure that each project listens to its own command line parameter.

     <PropertyGroup Condition="'$(BuildingInsideVisualStudio)' == false">
          <DeployOnBuild Condition="'$(DeployDefaultWebsiteOnBuild)' == 'true'>true</DeployOnBuild>
          <MSDeployTarget>MSDeployPublish</MSDeployTarget>
          ....
          ....
     </PropertyGroup>
    

    As you can see I’ve added a condition to the DeployOnBuild which will set it to true if DeployDefaultWebsiteOnBuild is set to true. Now you can set that property from the commandline.

     /p:DeployDefaultWebsiteOnBuild=true
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have two projects.One project is build in MVC asp.net and the other project
We have two WebApplication in one MVC solution, one for Desktop and the other
I have two ASP.NET MVC web applications. One of them logs unhandled exceptions to
I have an older asp.net mvc solution (s#arp framework) whith two projects one for
I have an mvc site with two projects. One is the site itself and
I have two projects in the same solution. One is an ASP.NET MVC 2
Let say I have two methods in MVC 4 Web API controller: public IQueryable<A>
I have two classes (MVC view model) which inherits from one abstract base class.
In the asp.net mvc 3 application I have two views which have the same
I have a pretty big web application that I created last year using ASP.NET

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.