Exclude files from assembly in Debug

My WP7 solution has a class library that contains three large built-in resources. When the XAP file is generated, it takes quite a lot of time to compress these three files, and I would like to speed up the time it takes to create when I work in debug mode (but not in release).

How to indicate in CSProj that I do not want file 2 and 3 to be created if I create Debug?

  <ItemGroup>
    <EmbeddedResource Include="Data\my-big-file-1.txt" />
    <EmbeddedResource Include="Data\my-big-file-2.txt" />
    <EmbeddedResource Include="Data\my-big-file-3.txt" />    
  </ItemGroup>

Thank!

+5
source share
1 answer

You can use the conditions in the project definition file.

http://msdn.microsoft.com/en-us/library/ms171455.aspx

<EmbeddedResource Include="Data\my-big-file-2.txt"  Condition=" '$(Configuration)' == 'Release' "/>
+9
source

All Articles