I've edited my csproj file according to this post, but the extra files in App_data will be deleted anyway. On the other hand, when I modify the msdeploy command as shown in the post, the skip is applied.
I'm using web deploy v3. And the command is
msdeploy.exe" -verb:sync -source:package=c:\builds\app.zip -dest:auto -setParam:"IIS Web Application Name"="Default Web Site/app"
Is there anyway to debug what can be causing this behavior ?
<PropertyGroup> <OnBeforePackageUsingManifest>AddCustomSkipRules</OnBeforePackageUsingManifest>
</PropertyGroup>
<Target Name="AddCustomSkipRules">
<ItemGroup>
<MsDeploySkipRules Include="SkipDeleteAppData">
<SkipAction>Delete</SkipAction>
<ObjectName>filePath</ObjectName>
<AbsolutePath>$(_Escaped_PackageTempDir)\\App_Data\\.*</AbsolutePath>
<XPath>
</XPath>
</MsDeploySkipRules>
<MsDeploySkipRules Include="SkipDeleteAppData">
<SkipAction>Delete</SkipAction>
<ObjectName>dirPath</ObjectName>
<AbsolutePath>$(_Escaped_PackageTempDir)\\App_Data\\.*</AbsolutePath>
<XPath>
</XPath>
</MsDeploySkipRules>
</ItemGroup>
</Target>