Visual Studio "Publish Preview" 功能 运行 背后的命令是什么?

What command does the Visual Studio "Publish Preview" feature run under the hood?

我有一个 ASP.Net Core 2.2 应用程序,我使用 Visual Studio 2017 中的 "Publish" 选项部署到 Azure App Service(导入从 Azure 下载的 *.PublishSettings 文件后传送门)。

有一个很好的 "Preview" 功能,它允许我在实际部署之前仔细检查将在 App Service 上进行的所有更改(即获取 "diff" / 执行 "trial run" / 做一个 "what if")。见下图。

我的问题: Visual Studio 实际上 运行 在后台执行什么命令来实现这个?由于我不想深入的原因,我想知道这个 "preview" 报告是否可以在命令行上重现。

这是我能得到的信息,仅供参考:

通过使用 fiddler,当我单击预览按钮时,我可以看到它首先从已发布的 azure web 应用程序中获取必要的文件,然后我认为 visual studio 会使用类似 git 的东西将从 azure 获得的文件与本地文件进行比较。但是我无法获取正在使用的命令。

您可以在 visual studio 的 msdn 和 azure web 应用程序上提出问题,例如 here

我很确定它使用 msdeploy with the -whatif flag set。此类命令的示例可能如下所示:

msdeploy.exe -verb:sync 
-source:package='path.to.zip' 
-dest:auto,ComputerName='...',UserName='$user',Password='pwd',AuthType='Basic' 
-enableRule:AppOffline 
-whatif 
-useCheckSum