Share via


Questions from the Field: Excluding Different Files or Directories on Debug and Release Builds

A customer asked me the other day about excluding different files (or directories) based on the type of build happening.  Specifically they wanted to exclude some files for Release builds and others for Debug builds.

 

Here is the general info on how to exclude files from builds:

https://msdn.microsoft.com/en-us/library/ms171455(v=VS.110)

 

Within the article you will want to take a look at the Condition attribute which specifically calls out how to exclude based on build type:

 <Compile
    Include="Formula.vb"
    Condition=" '$(Configuration)' == 'Release' " />