Fixing ASP.NET Web Publish File Copy Issue in Visual Studio 2012

If you are encountering issues with copying files during ASP.NET web publishing in Visual Studio 2012, don't worry! There is a solution to this problem.

  1. The issue
  2. The solution
  3. Why it works

The issue

The issue occurs when you attempt to publish your ASP.NET web application in Visual Studio 2012, and the process fails due to the inability to copy files to the target location. This can be frustrating, especially if you are on a tight deadline!

The solution

The solution to this issue is to modify the project file (.csproj or .vbproj) and add the following line of code:


This code should be added within the <Project> tag, but not within any other tags.

Once you've added this line of code, save the project file and attempt to publish your ASP.NET web application again. The file copy issue should now be resolved!

Why it works

The UseMsdeployExe property forces Visual Studio to use the msdeploy.exe executable to copy files during web publishing. This executable is more reliable than the built-in file copy functionality in Visual Studio, and should resolve any issues you may be experiencing.

So there you have it - a simple solution to a frustrating issue! Happy publishing!

Click to rate this post!
[Total: 0 Average: 0]

Related posts

Leave a Reply

Your email address will not be published. Required fields are marked *

Go up

Below we inform you of the use we make of the data we collect while browsing our pages. You can change your preferences at any time by accessing the link to the Privacy Area that you will find at the bottom of our main page. More Information