Author |
Topic: Try to run a sample program from the documentaion get System.TypeLoadException error (4 messages, Page 1 of 1) |
||||
---|---|---|---|---|---|
Moderators: VPfau | |||||
AAmi1662 Posts: 4 Joined: Sep 15, 2021 |
Hi, first time using C# and gain api. I'm trying to create a connection to the servers and i get the error:
System.TypeLoadException: 'Method 'TryGetConstructor' in type 'GF.SimpleInjector.InternalConstructorResolutionBehavior' from assembly 'GF.SimpleInjector, Version=4.0.3.13, Culture=neutral, PublicKeyToken=b6b45f2252711217' does not have an implementation.' not sure if it helpful but i got alert as well with yellow triangle saying: Package 'GFAPI 4.0.3.44' was restored using '.NETFramework,Version=v4.6.1, .NETFramework,Version=v4.6.2, .NETFramework,Version=v4.7, .NETFramework,Version=v4.7.1, .NETFramework,Version=v4.7.2, .NETFramework,Version=v4.8' instead of the project target framework '.NETCoreApp,Version=v3.1'. This package may not be fully compatible with your project. The code: using System; How do i solve it? Thank you Edited by AAmi1662 on Sep 17, 2021 05:29 AM |
||||
AAmi1662 Posts: 4 Joined: Sep 15, 2021 |
Hi, updated the post with the code.
|
||||
AAmi1662 Posts: 4 Joined: Sep 15, 2021 |
** FIxed by reinstalling everything
|
||||
SRuscak Posts: 50 Joined: Aug 24, 2017 |
Hello.
The answer is in the GF API assembly warning: Package 'GFAPI 4.0.3.44' was restored using '.NETFramework,Version=v4.6.1, .NETFramework,Version=v4.6.2, .NETFramework,Version=v4.7, .NETFramework,Version=v4.7.1, .NETFramework,Version=v4.7.2, .NETFramework,Version=v4.8' instead of the project target framework '.NETCoreApp,Version=v3.1'. This package may not be fully compatible with your project. .NET Framework assemblies can't be called from .NET Core 3.1. |
||||