I have a problem related to creating msdeploy package for deploying to azure web app.
I run msdeploy -verb:sync -source:contentPath="C:\inetpub\wwwroot\<SiteName>" -dest:package=test.zip
And after investigating package i found that it contains a full hierarchy of folders eg: \Content\C_C\inetpub\wwwroot\<SiteName>\
and when i am trying to deploy this package to azure a have an exception because i don't have such permissions.
Question: how to remove path from content folder so my archive will looks like \Content\<SiteName>
?
After a day of investigation i figure out how to do this:
$msDeployPackageCommand = "$MsDeployExePath
-source:iisApp=$PathToApplication
-dest:package=$ZipCreationPath
-verb:sync
-enableLink:contentLibExtension
-replace:match=$ReplacePathToApplication,replace=$replaceWith
-retryAttempts:2
-disablerule:BackupRule
-declareParam:name='PackageManagementService',kind='ProviderPath',scope='IisApp',match=$ReplacePathToApplication,defaultValue=$replaceWith";
This works fine.