Last active
January 11, 2016 15:34
-
-
Save akuryan/3c1c8fd7426b4829a34c to your computer and use it in GitHub Desktop.
Modify .csproj to include file content in delivery only once
This file contains 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> | |
$(OnBeforePackageUsingManifest); | |
AddSpecificSkipRule; | |
</OnBeforePackageUsingManifest> | |
<AfterAddIisSettingAndFileContentsToSourceManifest> | |
$(AfterAddIisSettingAndFileContentsToSourceManifest); | |
AddSpecificSkipRule; | |
</AfterAddIisSettingAndFileContentsToSourceManifest> | |
<!-- Due to known error (http://stackoverflow.com/questions/12576662/msdeploy-skip-rules-when-using-msbuild-publishprofile-with-visual-studio-2012) | |
we should use MsDeployExe for delivery, if we want to skip only several folders | |
And as we are skipping SeoChecker.config update - we shall use it always--> | |
<UseMsDeployExe>true</UseMsDeployExe> | |
</PropertyGroup> | |
<Target Name="AddSpecificSkipRule" > | |
<ItemGroup> | |
<MsDeploySkipRules Include="SkipUpdateSeoChecker"> | |
<SkipAction>Update</SkipAction> | |
<ObjectName>dirPath</ObjectName> | |
<AbsolutePath>Umbraco/Plugins/SEOChecker/Config</AbsolutePath> | |
<XPath> | |
</XPath> | |
</MsDeploySkipRules> | |
<MsDeploySkipRules Include="SkipUpdateSeoCheckerConfig"> | |
<SkipAction>Update</SkipAction> | |
<ObjectName>filePath</ObjectName> | |
<AbsolutePath>Umbraco/Plugins/SEOChecker/Config/SEOChecker\.config$</AbsolutePath> | |
<XPath> | |
</XPath> | |
</MsDeploySkipRules> | |
<MsDeploySkipRules Include="SkipUpdateSeoCheckerConfig"> | |
<SkipAction>Update</SkipAction> | |
<ObjectName>filePath</ObjectName> | |
<AbsolutePath>Umbraco\\Plugins\\SEOChecker\\Config\\SEOChecker\.config$</AbsolutePath> | |
<XPath> | |
</XPath> | |
</MsDeploySkipRules> | |
<MsDeploySkipRules Include="SkipUpdateContourForms"> | |
<SkipAction>Update</SkipAction> | |
<ObjectName>filePath</ObjectName> | |
<AbsolutePath>App_Plugins\\UmbracoForms\\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