开发者

What exactly is the Auto Provider in Web Deploy (msdeploy.exe)

Can somebody explain (better than the technet/msdn docs) what the auto provider exactly does, how it works, and when to use it.

This is in regard to Web Deploy. I've seen a lot of documentation specifying -dest:auto and it's not really making sense to me.

The auto provider specifies that the provider on a destination will be the same as the source provider.

Example

msdeploy.exe -verb:sync -source:appHostConfig="MySite" -dest:auto,computername=Server1

The auto provider enables you to avoid entering the full path for the -dest argument when the destination argument is the same as the -source argument. It also removes the need to copy the manifest file separately from an archive or package.

The auto provider takes the source that you specify and uses a corresponding location on the destination computer. For example, if you specify appHostConfig=Site1 as the source, the destination on the target computer will be Site1. This is useful when you want to synchronize a Web site "as is" to a remote machine.

technet docs for auto provider

Example that doesn't make sense:

msdeploy.exe -verb:sync -source:package=myapp.zip -dest:auto

Why would you ever set the destination exactly to the source? What is the point? Aren't you simply overwiting the source with iteslf?

The generated cmd file generated from publishing a package in VS2010 generates something like this:

"C:\Program Files\IIS\Microsoft Web Deploy V2\\msdeploy.exe" -source:package='MySourcePath' -dest:auto"  

Doesn't auto mean the source will just overwrite itself? But it doesn't, it actually updates the IIS web site (based on the settings in the manifest)

I've tried using package as the destination and in this case it did update the source package and not the IIS site.

The catalyst for this question is that I'm implementing CI and I 've always used msbuild/xcopy in the past. I want to utilize msdeploy now. I want 开发者_StackOverflow社区to understand it rather than simply calling the myproject.cmd that's generated from visual studio.

For example, this SO link specifies using the auto provider for the dest argument.

Thanks


I think you've actually figured out the answer for yourself.

If the source is a package and the destination is auto, that simply means that the components specified inside the package will be "unzipped" and placed on the destination server. In the -source:package -dest:auto syntax, "auto" does not mean that the package itself is the destination.

And, as you observe, if you specify a package as the destination, whatever you specify for the source will indeed be packaged up as a zip file that you can later use as a source to deploy elsewhere.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜