Last active
January 7, 2020 15:45
-
-
Save charlieanstey/fd175f3a6b8b196529a0 to your computer and use it in GitHub Desktop.
Visual Studio :: Skip files like App_Data during deployment, MSBuild,
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<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> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Is there a trick to get this to work? It still deletes app_data folder on target machine when using one click publishing from visual studio.