0

I have seen many answers to questions that appear to be exactly what I am looking for, such as (MSDeploy) Deploying Contents of a Folder to a Remote IIS Server, but these answers don't do what I need. I don't want to install the MSDeploy agent on the remote computer, or specify credentials to use.

This command does exactly what I want, but does not use a manifest, so my install script would need to know the destination for each package.

MSDeploy -verb:sync -disableRule:BackupRule ^
         -source:package=pkg.zip ^
         -dest:contentPath=\\server\share\path

If I use a manifest for the dest, and that manifest specifies a single contentPath (or dirPath) provider, such as:

<sitemanifest>
  <contentPath path="\\server\share\path">
</sitemanifest>

I get an error that the source (package) is not compatible with the dest (contentPath).

I've tried variations, such as using a full local path in the manifest and ",computerName=server" after the dest specification. This one wants the MSDeploy agent on the remote computer and for me to specify credentials.

I can't find any detailed documentation on the use of MSDeploy, only a myriad of examples that don't fit my needs.

I think the first example of what I tried above is likely the correct path, but I need to figure out how to package the source or build the manifest to make the two compatible.

1 Answers1

0

I believe your problem is the destination manifest doesn't match the manifest used to create the package or the package was not created from a manifest. The manifests have to match. If you let VS/MSBuild create the package you can open it with a zip utility and find the manifest file (the file is named archive.xml) that was used to create the package. Make a copy of that file and adjust the values for each manifest line as appropriate.

Here are a couple of blog posts that should help.

http://www.dotnetcatch.com/2016/02/25/the-anatomy-of-a-webdeploy-package/

This one is about creating a package manually. If you created the package manually you probably need to change to create it from a source manifest.

http://www.dotnetcatch.com/2016/06/23/deploy-an-asp-net-website-not-web-application-with-msdeploy/

chief7
  • 14,263
  • 14
  • 47
  • 80