Skip to content

Instantly share code, notes, and snippets.

@PatrickMcDonald
Created June 19, 2014 13:06
Show Gist options
  • Save PatrickMcDonald/cb43a325a87e6e2e99ff to your computer and use it in GitHub Desktop.
Save PatrickMcDonald/cb43a325a87e6e2e99ff to your computer and use it in GitHub Desktop.
<PropertyGroup>
<_EnableCleanOnBuildForMvcViews Condition=" '$(_EnableCleanOnBuildForMvcViews)'=='' ">true</_EnableCleanOnBuildForMvcViews>
</PropertyGroup>
<Target Name="CleanupForBuildMvcViews" Condition=" '$(_EnableCleanOnBuildForMvcViews)'=='true' and '$(MVCBuildViews)'=='true' " BeforeTargets="MvcBuildViews">
<ItemGroup>
<_TempWebConfigToDelete Include="$(BaseIntermediateOutputPath)**\Package\**\*" />
<_TempWebConfigToDelete Include="$(BaseIntermediateOutputPath)**\TransformWebConfig\**\*" />
<_TempWebConfigToDelete Include="$(BaseIntermediateOutputPath)**\CSAutoParameterize\**\*" />
<_TempWebConfigToDelete Include="$(BaseIntermediateOutputPath)**\TempPE\**\*" />
</ItemGroup>
<Delete Files="@(_TempWebConfigToDelete)" />
</Target>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment