简体   繁体   English

Godot 无法构建 C# 脚本:找不到 .NETFramework,Version=v4.7 的参考程序集

[英]Godot unable to build C# scripts : The reference assemblies for .NETFramework,Version=v4.7 were not found

I started a toy project with the Godot Game engine v3.2.2 using Mono.我使用 Mono 使用 Godot Game 引擎 v3.2.2 开始了一个玩具项目。 I just tried to compile a very simple C# script, and the build fails with the following error thrown in the logs:我只是尝试编译一个非常简单的 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.

Done building project "Bloopers.sln" -- FAILED.完成构建项目“Bloopers.sln”——失败。

I have Mono v.6.12 installed.我安装了 Mono v.6.12。 Any insight into this issue would be greatly appreciated !对这个问题的任何见解将不胜感激! Thanks!!!谢谢!!!

Ok, I just figured it out.好吧,我刚刚想通了。 I have both frameworks installed:我安装了两个框架:

  • Mono单核细胞增多症
  • dotnet core网络核心

Apparently Godot detects both and gives you an option between the two.显然 Godot 检测到两者并为您提供两者之间的选择。 By default it chooses dotnet core.默认情况下,它选择 dotnet 核心。 Godot at this moment only officially supports Mono. Godot 目前只正式支持 Mono。

To ensure you are using Mono: Editor -> Editor Settings Mono -> Builds Select "MSBuild(Mono)" in the drop down menu.确保您使用的是 Mono: Editor -> Editor Settings Mono -> Builds 在下拉菜单中选择“MSBuild(Mono)”。

Now my game builds.现在我的游戏建立了。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 找不到框架“.NETFramework,Version=v4.7.1”的参考程序集 - Reference assemblies for framework ".NETFramework,Version=v4.7.1" were not found 错误:未找到 .NETFramework,Version=v5.0 的参考程序集 - Error: The reference assemblies for .NETFramework,Version=v5.0 were not found Ranorex 构建失败 9.4.1 找不到框架“.NETFramework,Version=v4.7.2”的参考程序集 - Ranorex build fails 9.4.1 The reference assemblies for framework “.NETFramework,Version=v4.7.2” were not found Centos .netcore找不到框架“ .NETFramework,Version = v4.6.1”的参考程序集 - Centos .netcore The reference assemblies for framework “.NETFramework, Version=v4.6.1” were not found Uno 平台项目报告:未找到 .NETFramework,Version=v5.0 的参考程序集 - Uno Platform Project reports: The reference assemblies for .NETFramework,Version=v5.0 were not found VS 代码 - 未找到“.NETFramework,Version=v5.0”的参考程序集 - VS Code - The reference assemblies for ".NETFramework,Version=v5.0" were not found Package 'Microsoft.AspNet.Mvc 5.2.7' 已使用 '.NETFramework,Version=v4.6.1, .NETFramework,Version=v4.6.2, .NETFramework,Version=v4.7, - Package 'Microsoft.AspNet.Mvc 5.2.7' was restored using '.NETFramework,Version=v4.6.1, .NETFramework,Version=v4.6.2, .NETFramework,Version=v4.7, 未找到框架 .NETCore、Version=v5.0 的参考程序集 - The reference assemblies for framework .NETCore, Version=v5.0 were not found 使用 Docker .NET 核心映像构建 WinForms C# 应用程序导致错误:.NETFramework,Version=v4.6.1 were not found - Building a WinForms C# application with Docker .NET Core image results to an error : .NETFramework,Version=v4.6.1 were not found dotnet 运行报告 '.NETFramework,Version=v4.8 未找到' - dotnet run reporting '.NETFramework,Version=v4.8 were not found'
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM