Files
squad-rain-ops-mini/Directory.Build.props

28 lines
1.1 KiB
XML

<Project>
<PropertyGroup>
<!-- 禁用CET兼容性检查 -->
<CETCompat>false</CETCompat>
<EnableCETCompat>false</EnableCETCompat>
<!-- 禁用ReadyToRun以避免CET问题 -->
<PublishReadyToRun>false</PublishReadyToRun>
<!-- 添加编译器常量 -->
<DefineConstants>$(DefineConstants);DISABLE_CET</DefineConstants>
<!-- 抑制相关警告 -->
<NoWarn>$(NoWarn);CS1701;CS1702;CS1705;CS8019</NoWarn>
<!-- 强制使用 dotnet 运行 csc.dll 以绕过 csc.exe 的 CET 检查 -->
<UseSharedCompilation>false</UseSharedCompilation>
<CscToolPath>$(MSBuildThisFileDirectory)</CscToolPath>
<CscToolExe>csc-wrapper.cmd</CscToolExe>
</PropertyGroup>
<!-- 运行时配置 -->
<ItemGroup>
<RuntimeHostConfigurationOption Include="System.Runtime.CompilerServices.RuntimeFeature.IsCetSupported" Value="false" />
<RuntimeHostConfigurationOption Include="System.Runtime.CompilerServices.RuntimeFeature.IsCetRequired" Value="false" />
<RuntimeHostConfigurationOption Include="System.Runtime.InteropServices.BuiltInComInteropSupport" Value="false" />
</ItemGroup>
</Project>