API Support Forum
OEC API > API Support > System.TypeLoadException
Author Topic: System.TypeLoadException
(6 messages, Page 1 of 1)
Moderators: VPfau
FGiordano538
Posts: 24
Joined: May 09, 2022


Posted: Jan 24, 2024 @ 07:22 AM             Msg. 1 of 6
I have updated the package "GFAPI 4.11.519.358" and now I am getting this error on this command "GF.Api.Impl.GFApi.CreateClient()":

"System.TypeLoadException: 'Il metodo 'TryGetConstructor' del tipo 'GF.SimpleInjector.InternalConstructorResolutionBehavior' dell'assembly 'GF.SimpleInjector, Version=4.11.519.358, Culture=neutral, PublicKeyToken=b6b45f27e2749b17' non ha un'implementazione.'".

I also have the same error with the advanced example.
What am I doing wrong?
Thank you."
SPikalov
Posts: 25
Joined:


Posted: Jan 25, 2024 @ 04:26 AM             Msg. 2 of 6
Hello.
I can't reproduce your issue.
Are you using the latest version of AdvancedExample?
FGiordano538
Posts: 24
Joined: May 09, 2022


Posted: Jan 25, 2024 @ 09:00 AM             Msg. 3 of 6
I used the latest version of the AdvancedExample and updated the GFAPI references to the latest version.
I'm having this problem with both the C# example and my VB.net executable that worked before the update.
SPikalov
Posts: 25
Joined:


Posted: Jan 26, 2024 @ 01:01 AM             Msg. 4 of 6
Looks like the wrong version of SimpleInjector nuget package installed
It should be SimpleInjector.4.7.1

You can try the following:
Clone BasicExample
https://bitbucket.org/GainFuturesDev/basicexample
Open GF.BasicExample.sln ->
Restore NuGet Packages -> Make sure that it finshed without errors
The 'packages' folder should contain the following:
GFAPI.4.11.519.358
Microsoft.Bcl.AsyncInterfaces.5.0.0
Microsoft.CSharp.4.7.0
SimpleInjector.4.7.1
System.Buffers.4.5.1
System.Diagnostics.Contracts.4.3.0
System.Linq.4.3.0
System.Linq.Queryable.4.3.0
System.Memory.4.5.4
System.Numerics.Vectors.4.5.0
System.Reflection.Emit.4.6.0
System.Reflection.Emit.Lightweight.4.3.0
System.Runtime.CompilerServices.Unsafe.4.5.3
System.Threading.Tasks.Extensions.4.5.4
System.ValueTuple.4.5.0

-> Build Solution
-> Start

If there are no issues - repeat this with AdvancedExample
Edited by SPikalov on Jan 26, 2024 01:05 AM
SPikalov
Posts: 25
Joined:


Posted: Jan 26, 2024 @ 01:03 AM             Msg. 5 of 6
FGiordano538
Posts: 24
Joined: May 09, 2022


Posted: Jan 29, 2024 @ 03:04 AM             Msg. 6 of 6
Good morning, I restarted the old project without updates and only updated the GFAPI.4.11.519.358 package.
Now everything works.
Thank you.