build - 不安全代码需要指定 `unsafe` 命令行选项 Monodevelop 4.0.12

标签 build monodevelop

我正在尝试构建项目 SDRShare但是当我来到 buiild-all 这一步时,我得到了以下错误

enter image description here

我尝试这样做:

我的 Monodevelop GUI 没有这个选项 enter image description here

Monodevelop 4.0.12 上的这个选项在哪里?

解决方案

this is the solution that I fund , 没有构建不安全代码的参数,我找到了一些具有此配置的文件,这些文件的扩展名为 .csproj当你需要说允许不安全代码时 具有以下标签:<AllowUnsafeBlocks>true</AllowUnsafeBlocks> , 如果你把 false 放在这个标签里不允许不安全的代码。这部分代码应该在 block 内 <PropertyGroup>

这是部分代码:

<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x86'">
    <DebugSymbols>true</DebugSymbols>
    <OutputPath>..\Debug\</OutputPath>
    <DefineConstants>DEBUG;TRACE</DefineConstants>

    <DebugType>full</DebugType>
    <PlatformTarget>x86</PlatformTarget>
    <ErrorReport>prompt</ErrorReport>
    <CodeAnalysisIgnoreBuiltInRuleSets>false</CodeAnalysisIgnoreBuiltInRuleSets>
    <CodeAnalysisIgnoreBuiltInRules>true</CodeAnalysisIgnoreBuiltInRules>
    <CodeAnalysisFailOnMissingRules>true</CodeAnalysisFailOnMissingRules>
    <WarningLevel>4</WarningLevel>
    <Optimize>false</Optimize>
                 <!-- This is the solution -->
    <AllowUnsafeBlocks>true</AllowUnsafeBlocks>

  </PropertyGroup>

最佳答案

我发现这适用于 Mono Develop 版本 5.9.6。

查看截图。

enter image description here

关于build - 不安全代码需要指定 `unsafe` 命令行选项 Monodevelop 4.0.12,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/23328163/

相关文章:

c++ - 带有子目录的 CMake

visual-studio - 使用 cmake 和命令行构建 MSVC 项目

c# - MonoDroid Android 开发相似点

c# - 当我使用属性窗口中的 pixbuf 选项将图像添加到 gtk 窗口时,Monodevelop 不断崩溃

c# - 在 Mac 上使用 Monodevelop 的反馈/经验?

xamarin.ios - 如何从 NSData 到 byte[]

asp.net-mvc - Visual Studio : How to override the default "Build Action" for certain extension types per project or solution?

java - IntelliJ - 找不到模块 : java. xml.ws.annotation

Java 构建路径

c++ - 我如何在 monodevelop (C++) 中链接 SDL 和 GL