Sunday, January 26, 2014

How to Publish Web Application Project in Visual Studio 2012

In one of tutorial I explained about How to Publish Asp.Net Website in VS2012 . Publishing website is different than publishing Web Application in 4.5 in visual studio 2012. In this tutorial I am going to explain the steps to publish the web project in visual studio 2012 using framework 4.5.

Steps to Publish Web Application in Visual Studio 2012:

Step 1: Right click on the web project in the solution explorer window and then select the option Publish as shown in  diagram below:

Publish web application in visual studio 2012

Step 2: Publish Web Application Window will open .Here under the option Select or Import a publish profile Select the option New in the drop down as shown in the picture below:

Profile option in visual studio 2012 publish

Step 3: In New Profile Window give any name to Profile and then click on Ok as shown in the image below:

Profile Name in Publish wizard 2012

Step 4: Next in Connection Select the Publish method File System as shown in the image below:

Publish method file system in vs 2012

Step 5: Again in Connection for Target location select the folder on your computer where you want to publish the web application and then click on Next Button as shown in the screen shot below:

Target location in visual studio 2012

Step 6: In Settings Select the Configuration Release in the drop down and then click on Next Button as shown below:

Release mode in visual studio 2012

Step 7: Finally in the Preview Click on Publish to Publish the web Project to  folder selected in the Step 5 above as shown below:

publish project in visual studio 2012

After Publish succeeded message browse the folder on your computer to look for the published web project in visual studio 2012.


  1. This comment has been removed by the author.

  2. I've been able to deploy my web application to the local machine and it works fine, but not to my production server on the network.
    1. I realized my setting tab in the Publish Web Application is stuck at Debug, I couldn't change it to Release as suggested in the instructions.
    2. When I tried to open the website on the production server,it complained about the targetframework version. This is confusing, because the same settings on the local machine works fine. On both the production server and the local machine the Application Pool is using v4.0 and the web.config value is 4.5

  3. Hi Peekay,
    It might be possible that framework 4.5 is not installed on IIS . Try to install framework 4.5. If it doesn't solve then register framework using visual studio command prompt. Hope this will solve the problem. If not then let me know I will try to sort out the issue.