Question

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.

Was it helpful?

Solution 3

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.

OTHER TIPS

This can also happen if there are any files in your project that have been moved, deleted, or renamed from the file system such that Visual Studio doesn't know where to find them.

My error was allmost identical:

C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v12.0\Web\Microsoft.Web.Publishing.targets (3883): Web deployment task failed. (Object of type 'manifest' and path 'D:\B\280\Binaries_PublishedWebsites\ProjectName\ProjectName.SourceManifest.xml' cannot be created. Learn more at: http://go.microsoft.com/fwlink/?LinkId=221672#ERROR_EXCEPTION_WHILE_CREATING_OBJECT.)

The reason I found out is in the ProjectName.SourceManifest.xml file.

There is a line: <appHostConfig path="Default Web Site/ProjectName" />

If this webapp and site does NOT exist on the buildmachine, the error occurs. Once I created a dummy webapp site with the same name on the same site, it built!

And solved by removing that section with MsBuild parameters: /p:IncludeIisSettings=false /p:IncludeAppPool=false (i had those 2 to true, so only applies when you have them true)

Thought I would add as none of the other answers fixed my problem, though perhaps more related to Lightswitch Web Deploy than ASP.NET Web Deploy (though OP doesn't specify which).

There are three projects within a standard Lightswitch Template solution. Two of them might be named lightswitchapp.HTMLClient and lightswitchapp.Server. Neither of these should be deployed! You should deploy the third project lightswitchapp.

I had been getting errors like this, which led me to this page.

Web deployment task failed. (Object of type 'manifest' and path 'manifest xml hidden' cannot be created. Learn more at: http://go.microsoft.com/fwlink/?LinkId=221672#ERROR_EXCEPTION_WHILE_CREATING_OBJECT.)

Great answer above, regarding the Lightswitch Web Deploy...couldn't find anything about it anywhere...kept thinking MS broke this on purpose because they don't want to support LightSwitch anymore... In any case, once you go through the steps on publishing the main project from the LightSwitch template, a new problem arises, regarding the publish params if you push to a local IIS. For all of you struggling with that...first install

  • httpPlatformHandler_amd64.msi
  • WebDeploy_amd64_en-US.msi

then, make sure "Web Deployment Agent Service" is running as a service then, in Visual Studio (I am on VS2015 community), on the Publish Settings tab in the wizard, make sure you have something like this:

  1. Service URL: http://localhost/MSDEPLOYAGENTSERVICE
  2. Site/Application: Default Web Site\trax01

where trax01 is the name of your web app that runs under Default Web Site (please notice the back-slash before "trax01" compared to the forward-slash in the label for the setting.

Hope it helps somebody else, because this thing ate my liver! :)

The same exception can still happen in Visual Studio 2019. Additional detail for me was Object of type 'manifest' and path 'manifest xml hidden' cannot be created.

In my case the problem was a MsDeployDeclareParameters item in the {ProjectName}.wpp.targets file. It was attempting to set ACL permissions for the downloads folder, but the folder didn't contain any files so it wasn't present in the staging area.

Adding a file to the downloads folder resolved the problem (as would removing the MsDeployDeclareParameters entry from the {ProjectName}.wpp.targets file).

I tried many Solution by updating security to TLS 1.2 (X)

Removed * or special character from variables and password.

But later I found that, we have * in the password of connectionString in web.config.

I changed my password and it started working for me.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top