msdeployvisual-studio-2013webdeploy

Visual Studio 2013 Web Deploy fails


I just installed VS 2013, upgrading from VS 2010. Creating a web deployment package zip file used to work in 2010. using VS 2013's Publish Web feature to publish to a Web Deploy Package, I getting the following error:

Web deployment task failed. (Object of type 'manifest' and path 'D:\dev\DMWeb\DMWebClient\obj\Test\Package\DMWebClient.SourceManifest.xml' cannot be created. Learn more at: http://go.microsoft.com/fwlink/?LinkId=221672#ERROR_EXCEPTION_WHILE_CREATING_OBJECT.)

The details in the Web Publish Activity tab shows the following:

Transformed Web.config using D:\dev\DMWeb\DMWebClient\Web.Test.config into obj\Test\TransformWebConfig\transformed\Web.config. Auto ConnectionString Transformed Views\Web.config into obj\Test\CSAutoParameterize\transformed\Views\Web.config. Auto ConnectionString Transformed obj\Test\TransformWebConfig\transformed\Web.config into obj\Test\CSAutoParameterize\transformed\Web.config.

Copying all files to temporary location below for package/publish: obj\Test\Package\PackageTmp.

Packaging into D:\dev\DMWeb\DMWebClient\obj\Test\Package\DMWebClient.zip.

C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v12.0\Web\Microsoft.Web.Publishing.targets(3883,5):

Error ERROR_EXCEPTION_WHILE_CREATING_OBJECT: Web deployment task failed. (Object of type 'manifest' and path 'D:\dev\DMWeb\DMWebClient\obj\Test\Package\DMWebClient.SourceManifest.xml' cannot be created.

Learn more at: http://go.microsoft.com/fwlink/?LinkId=221672#ERROR_EXCEPTION_WHILE_CREATING_OBJECT.)

Package failed.

In VS 2010, I've had to run it as Administrator for deploy to work, and I'm doing so here as well. I've also tried giving Full Control permissions to the project folder to NETWORK SERVICE, LOCAL SERVICE, Authenticated Users, and myself.

In the Package folder, there is the PackageTmp folder (which looks good), and the DMWebClient.SourceManifest.xml file, and that's it. In VS 2010, there's more files there.

DMWebClient.SourceManifest.xml contains:

<?xml version="1.0" encoding="utf-8"?>
<sitemanifest>
  <IisApp path="D:\dev\DMWeb\DMWebClient\obj\Test\Package\PackageTmp" />
  <setAcl path="D:\dev\DMWeb\DMWebClient\obj\Test\Package\PackageTmp" setAclResourceType="Directory" />
  <setAcl path="D:\dev\DMWeb\DMWebClient\obj\Test\Package\PackageTmp" setAclUser="anonymousAuthenticationUser" setAclResourceType="Directory" />
  <setAcl path="D:\dev\DMWeb\DMWebClient\obj\Test\Package\PackageTmp\App_Data" setAclResourceType="Directory" setAclAccess="Write" />
  <setAcl path="D:\dev\DMWeb\DMWebClient\obj\Test\Package\PackageTmp/DMWeb.config" setAclResourceType="File" setAclAccess="Read,Write" />
</sitemanifest>

In VS 2010, the last line containing DMWeb.config doesn't exist. On top of that, the path to it is wrong. It should be under the App_Data folder. DMWeb.config is specified in Web.config like this:

<appSettings file="DMWeb.config">

Any help would be greatly appreciated.


Solution

  • Found out that I had an old .wpp.targets file from VS 2010, it was called ~DMWebClient.wpp.targets. In VS 2010, by renaming it, it would ignore it and not apply it. It seems like VS 2013 applies any .wpp.targets files regardless of the file name.

    By removing that file, web deploy works again.