VS2012 Error when creating publish package: Exception in Executing Publishing Access to path is denied

msbuildmsdeployvisual studio 2012

I am trying to publish an application with VS2012 and when i try and make the package i get an error that access to the path is denied. I have checked and my user has full control and verified the path.

VS is trying to access .pubmxl file that is there.

I have also tried running VS2012 as administrator.

Best Answer

I had this same issue (VS2012: Access to path is denied when executing publish) and found a way to allow Visual Studio access to the file.

If you open the pubxml file in Visual Studio, make an edit, and save the file, Visual Studio is able to successfully publish using that file. Hope this works for you too.