【问题标题】:Godot unable to build C# scripts : The reference assemblies for .NETFramework,Version=v4.7 were not foundGodot 无法构建 C# 脚本:.NETFramework,Version=v4.7 的参考程序集未找到
【发布时间】:2021-01-06 08:46:36
【问题描述】:

我使用 Mono 使用 Godot 游戏引擎 v3.2.2 开始了一个玩具项目。 我只是尝试编译一个非常简单的 C# 脚本,构建失败并在日志中抛出以下错误:

Project "Bloopers.sln" (Build target(s)):
Message: Building solution configuration "Debug|Any CPU".
Project "Bloopers.csproj" (default targets):
    /usr/share/dotnet/sdk/3.1.402/Microsoft.Common.CurrentVersion.targets(1177,5): error MSB3644: The reference assemblies for .NETFramework,Version=v4.7 were not found. To resolve this, install the Developer Pack (SDK/Targeting Pack) for this framework version or retarget your application. You can download .NET Framework Developer Packs at https://aka.ms/msbuild/developerpacks [/home/mrblack/src/games/godot/godot_v3/lab/first_game_dotnet/Bloopers.csproj]
    MakeDir: Creating directory ".mono/temp/obj/Debug/".
Done building project "Bloopers.csproj" -- FAILED.

完成构建项目“Bloopers.sln”——失败。

我安装了 Mono v.6.12。任何对此问题的见解将不胜感激! 谢谢!!!

【问题讨论】:

    标签: c# mono godot


    【解决方案1】:

    好的,我刚刚想通了。 我安装了两个框架:

    • 单声道
    • dotnet 核心

    显然 Godot 检测到了两者,并为您提供了两者之间的选择。默认 它选择dotnet core。 Godot 目前只正式支持 Mono。

    为确保您使用的是 Mono: 编辑器 -> 编辑器设置 单声道 -> 构建 在下拉菜单中选择“MSBuild(Mono)”。

    现在我的游戏构建了。

    【讨论】:

      猜你喜欢
      • 2022-09-25
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2022-01-15
      相关资源
      最近更新 更多