0

What exactly happen when I use Publish Web command inside Visual Studio 2012 for ASP MVC project?

How can I activate the same command from command line?

Ido Ran
  • 10,584
  • 17
  • 80
  • 143

1 Answers1

1

It just call specific target to execute via MSBuild engine. That target could call MSDeploy tool to perform actual deployment (or could not, depending on profile settings)

Check this questions answer for the second part

Community
  • 1
  • 1
Alexey Shcherbak
  • 3,394
  • 2
  • 27
  • 44
  • My question is which specific target is execute and in which .target file is it define? I found that the web deployment targets are defined in MSBuild\Microsoft\VisualStudio\v10.0\Web\Microsoft.Web.Publishing.targets but I found only Package target and not Deploy target in there. – Ido Ran Nov 03 '12 at 07:09
  • Looks like I've found the answer and it is **MSDeployPublish** inside Microsoft.Web.Publishing.targets – Ido Ran Nov 03 '12 at 07:23
  • For vs2012 MSDeployPublish target executed, for VS2010 - PipelinePreDeployCopyAllFilesToOneFolder – Alexey Shcherbak Nov 03 '12 at 11:46
  • @AlexeyShcherbak - FYI, You can make VS2012's publishing available to VS2010 by installing the Azure SDK Tools for VS 2010. It will create a new "v10.5" Publishing.targets and connect it up to WebApplication.targets so no changes are required per project. – Richard Szalay Nov 29 '12 at 09:14
  • @RichardSzalay Thanks for hint. But I never heard that an AzureSDK tools makes changes to the WebPublishing.targets file. Sounds scary cause imo they should be independent from eachother – Alexey Shcherbak Nov 29 '12 at 10:01
  • @AlexeyShcherbak - It modifies WebApplication.targets to import 10.5\Web.Publishing.targets rather than the default 10.0\Web.Publishing.targets, bringing functional parity with the 2012 (11.0) target files. – Richard Szalay Nov 29 '12 at 11:18