Unsafe code compilation error in .NET Core even after setting allowunsafe flag to true in project.json

后端 未结 2 1072
攒了一身酷
攒了一身酷 2021-02-12 11:33

I am using some unsafe code in my .NET Core app. For that, I had made this change in the project.json file:



        
相关标签:
2条回答
  • 2021-02-12 11:43

    Change compilationOptions to buildOptions:

    "buildOptions": {
        "allowUnsafe": true
    }
    
    0 讨论(0)
  • 2021-02-12 11:57

    In the newer *.csproj files, this is now:

    <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
    

    in any PropertyGroup.

    0 讨论(0)
提交回复
热议问题