-
-
Notifications
You must be signed in to change notification settings - Fork 23.8k
Description
Godot version:
- 3.2.3 mono stable
- 4.0 mono compiled at commit d425cf6
OS/device including version: Ubuntu 20.04
Issue description:
Godot 3.2.3 was released and includes PR #41408 which, as I understand, should allow me to change the framework to .NET Standard 2.0 or greater. So I tried changing the framework to netstandard2.1 and found this issue.
The game compiles fine but when launching it, it immediately crashes with the error:
E 0:00:00.509 debug_send_unhandled_exception_error: System.IO.FileNotFoundException: Could not load file or assembly 'System.Text.Json, Version=4.0.1.2, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51' or one of its dependencies.
<C++ Error> Unhandled exception
<C++ Source> modules/mono/mono_gd/gd_mono_utils.cpp:424 @ debug_send_unhandled_exception_error()
The .csproj is as follows:
<Project Sdk="Godot.NET.Sdk/3.2.3">
<PropertyGroup>
<TargetFramework>netstandard2.1</TargetFramework>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="System.Text.Json" Version="4.7.2" />
</ItemGroup>
</Project>This only happens when changing the framework to netstandard2.0 or netstandard2.1, I have found that both of those throw that error, but if the framework is kept as net472 it works fine. I'm not sure if 3.2.3 is supposed to work well with .NET Standard since the default is still net472 so I tried compiling master as well and got the same results.
Steps to reproduce:
- Create a new project
- Change
TargetFrameworktonetstandard2.1 - Add
System.Text.Jsonpackage (dotnet add package System.Text.Json) - Launch Game in Editor
- Game builds and launches but immediately crashes
Minimal reproduction project:
NetStd21.zip