Skip to content

Instantly share code, notes, and snippets.

@pavel-agarkov
Created February 1, 2018 16:20
Show Gist options
  • Save pavel-agarkov/87ddfd9f7688eaed451e111aba54cd54 to your computer and use it in GitHub Desktop.
Save pavel-agarkov/87ddfd9f7688eaed451e111aba54cd54 to your computer and use it in GitHub Desktop.
Conditional test files exclusion
...
<Choose>
<When Condition=" '$(Configuration)'!='Test' ">
<ItemGroup>
<Compile Remove="**/*.Spec.cs" />
<Compile Remove="**/*.Stub.cs" />
<Compile Remove="**/*.Stubs.cs" />
<Compile Remove="**/*.Test.cs" />
<Compile Remove="**/*.Tests.cs" />
</ItemGroup>
</When>
</Choose>
...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment