msbuild
似乎不允许我构建unsafe
代码块,尽管我的.csproj
文件中指定了:
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
...
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
</PropertyGroup>
我的构建命令是:
msbuild myProject.sln /p:Configuration=Release /p:Platform="Any CPU" /t:Clean,Build