You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Installing System.Text.Json via command line will install 7 packages:
"Microsoft.Bcl.AsyncInterfaces.5.0.0, System.Buffers.4.5.1, System.Memory.4.5.4, System.Runtime.CompilerServices.Unsafe.5.0.0, System.Text.Encodings.Web.5.0.1, System.Text.Json.5.0.2, System.Threading.Tasks.Extensions.4.5.4"
Installing System.Text.Json via NugetForUnity install 3 packages:
"Microsoft.Bcl.AsyncInterfaces.5.0.0, System.Text.Encodings.Web.5.0.1, System.Text.Json.5.0.2"
Running unity project using NugetForUnity and missing 4 packages will lead to this error: Assembly 'Assets/NugetPackages/System.Text.Json.5.0.2/lib/net461/System.Text.Json.dll' will not be loaded due to errors: Unable to resolve reference 'System.Runtime.CompilerServices.Unsafe'. Is the assembly missing or incompatible with the current platform? Reference validation can be disabled in the Plugin Inspector.
Specs
NuGet Package: System.Text.Json 5.0.2
NuGetForUnity Version: 3.0.3
Unity Version: 2021.2.1f1
Unity Project Settings' default Api Compatibility Level" is ".NET Framework"
Operating System: Windows 10
How to reproduce
Create a new empty project in unity 2021.2.1f1
Install NugetForUnity and install System.Text.Json version 5.0.2
In the main scene, create an empty game object and add a monoBehavior.
In the new monobehavior's Start() add the following line: Debug.Log(JsonSerializer.Deserialize<string>("\"test\""));
Additional Notes / Bugs
Using System.Text.Json version 6.0.0 in a new project will lead to an additional layer of errors: Multiple precompiled assemblies with the same name System.Text.Json.SourceGeneration.resources.dll included on the current platform. Only one assembly with the same name is allowed per platform.
Unity Project Settings' default "Api Compatibility Level*" is .Net Standard 2.1 which download netstandard2.0.
You might get an error where unity tries to reference net461.
The text was updated successfully, but these errors were encountered:
Description
Installing System.Text.Json via command line will install 7 packages:
"Microsoft.Bcl.AsyncInterfaces.5.0.0, System.Buffers.4.5.1, System.Memory.4.5.4, System.Runtime.CompilerServices.Unsafe.5.0.0, System.Text.Encodings.Web.5.0.1, System.Text.Json.5.0.2, System.Threading.Tasks.Extensions.4.5.4"
Installing System.Text.Json via NugetForUnity install 3 packages:
"Microsoft.Bcl.AsyncInterfaces.5.0.0, System.Text.Encodings.Web.5.0.1, System.Text.Json.5.0.2"
Running unity project using NugetForUnity and missing 4 packages will lead to this error:
Assembly 'Assets/NugetPackages/System.Text.Json.5.0.2/lib/net461/System.Text.Json.dll' will not be loaded due to errors: Unable to resolve reference 'System.Runtime.CompilerServices.Unsafe'. Is the assembly missing or incompatible with the current platform? Reference validation can be disabled in the Plugin Inspector.
Specs
How to reproduce
Debug.Log(JsonSerializer.Deserialize<string>("\"test\""));
Additional Notes / Bugs
Multiple precompiled assemblies with the same name System.Text.Json.SourceGeneration.resources.dll included on the current platform. Only one assembly with the same name is allowed per platform.
You might get an error where unity tries to reference net461.
The text was updated successfully, but these errors were encountered: