Christian
Christian

Reputation: 1

Assembly.Load signature is different between .NET8 and .NET4.8 (Missing method)

My Assembly (A) written for .NET8 is calling a method (M) in assembly (library) (B) written in .NET4.8. Assembly B is from an external supplier. M internally calls Assembly.Load with the following signature -> Load(Byte[], Byte[], SecurityContextSource).
Because the code get's executed in the .NET8 runtime context (enforced by entry assembly A), the method call in B has also this environment.
Unfortunatelly .NET8 does not have this method signature anymore. That's why the call of M fails with an exception. I tried to reference the NuGet package Microsoft.Windows.Compatibility in A in order to get the missing method in my runtime. Unfortunatelly this won't work. Does anyone know an answer to solve this problem?

Like I already told, i tried to add Microsoft.Windows.Compatibility to my entry assembly in order to get the missing method signature in my code.

I expected that this package has the missing signature and B can call it without any problems

Upvotes: 0

Views: 78

Answers (0)

Related Questions