Windows Phone 8, C# project. I have some content files that go into my app package as resources (build type "Content"). Depending on build configuration (Debug vs. Release), I want to exclude some of them from the build process. Can I? There's nothing in the properties window to that effect. However, in C++ projects I can do that to individual source files...
问问题
318 次
2 回答
4
您也可以进入 .csproj 文件并手动编辑它。在那里,您可以为此设置各种属性。即,将此添加到您只想应用于特定构建的任何内容中:
Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "
示例:
<Content Include="Assets\ReleaseImage.png" Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' " />
<Content Include="Assets\DebugImage.png" Condition= " '$(配置)|$(平台)' == '调试|AnyCPU' " />
于 2012-11-16T02:22:19.763 回答