We were building a Visual Studio 2010 solution with the following msbuild command:
msbuild MySolution.sln /p:DeployOnBuild=true;DeployTarget=Package
This command built the solution and created the deployment packages for web projects in the solution.
But after we've migrated to Visual Studio 2012 this command doesn't work anymore. The solution is built, but no deployment packages are created.
How to fix it?
How to create deployment zip packages for any Microsoft Visual Studio 2012 project type, simply by editing the *.csproj files. – Knowledgebase If you want to create deployment zip packages for any Microsoft Visual Studio project type (like, Web Site, Web Service, Windows Service, Console Application etc. then just follow the steps below:
Web Deployment Packages. In Visual Studio 2010, you can create Web Deploy packages through the UI or by using MSBuild on the command line. Both of these methods will generate 1) a standard Web Deploy package and 2) a batch (.cmd) file that will help you deploy the package. Start Visual Studio 2010 and load up the Contoso University C# solution.
Start Visual Studio 2010 and load up the Contoso University C# solution. Click the Package/Publish Web tab. Choose the Configuration for the package. Packages are configuration specific and settings are per configuration, so you need to choose the configuration and configure the setting before creating a package.
Configuring Package/Publish Options: Start Visual Studio 2010 and load up the Contoso University C# solution. In Solution Explorer, expand the ContosoUniversity node and double click Properties (C#) Click the Package/Publish Web tab. Choose the Configuration for the package.
The problem was exactly the same as in this question. Copying *C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v11.0\Web** from a local machine to a remote CI server.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With