【发布时间】:2020-04-09 13:54:24
【问题描述】:
出于安全原因,我需要从生成的exe 中排除一些代码和一些文件。我为此使用条件编译符号SECURE。
排除代码很简单
#if !SECURE
// Some secure code
#endif
但对于文件 - 不是那么多。只有在定义了SECURE 符号的情况下,我应该在下面的Condition 中写什么来排除这些文件?
<ItemGroup Condition="???">
<Compile Remove="SecureClass.cs" />
<None Include="SecureClass.cs" />
</ItemGroup>
【问题讨论】:
标签: c# csproj conditional-compilation