Visual Studio 2013 Web Deploy fails
Asked Answered
R

7

5

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.

Radical answered 29/10, 2013 at 21:45 Comment(2)
That's strange I don't know why it would insert that additional setAcl. IIRC we did not make any changes to setAcl in a while. Do you need the setAcl for this package? If not you can disable that by setting the MSBuild property IncludeSetAclProviderOnDestination to false. You can do that in your publish profile (.pubxml file).Cantu
Sayed, thanks for answering. See my answer below. I had an old wpp.targets file. Deleting it made it work. Is VS 2013 applying any wpp.targets files it finds? Thanks for the IncludeSetAclProviderOnDestination tip.Radical
R
2

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.

Radical answered 1/11, 2013 at 14:2 Comment(0)
L
7

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.

Loftin answered 20/5, 2014 at 19:14 Comment(1)
I just had this error for this exact reason - I had moved a project to a different directory and the pubxml file was still referencing a post-deploy SQL script relative to the old location.Polythene
M
5

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)

Maria answered 28/2, 2014 at 11:59 Comment(1)
Thanks, it was exactly the same issue I was having.Ballonet
R
2

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.

Radical answered 1/11, 2013 at 14:2 Comment(0)
M
2

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.)

Milkwhite answered 3/2, 2016 at 20:23 Comment(0)
K
1

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! :)

Kenyakenyatta answered 26/5, 2016 at 16:1 Comment(0)
E
1

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).

Electroplate answered 24/10, 2021 at 22:35 Comment(0)
D
0

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.

Dale answered 26/11, 2021 at 19:1 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.