runtime icon indicating copy to clipboard operation
runtime copied to clipboard

Could not load type 'System.Runtime.InteropServices.Marshal' from assembly 'System.Runtime'

Open zepamble opened this issue 7 years ago • 2 comments

I use System.Runtime.InteropServices.Marshal in the wpf project of .net core 3.0, which works fine in the native development environment, but when it is released to other machines, it prompts "System.TypeInitializationException: The type initializer for '' Threw an exception. ---> System.TypeLoadException: Could not load type 'System.Runtime.InteropServices.Marshal' from assembly 'System.Runtime, Version=4.2.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. ", but System.Runtime.InteropServices.Marshal is in System.Runtime.InteropServices.dll, not System.Runtime.dll, what is the reason? Quote confusion?

zepamble avatar Apr 26 '19 02:04 zepamble

@okman523 We would need to see the application and how this was being deployed to the other environment to understand the issue here. Is there a repo we can examine or can you post the project on a gist?

AaronRobinsonMSFT avatar Apr 26 '19 02:04 AaronRobinsonMSFT

@okman523 Closing this due to inactivity. If the issue continues, please reply here and we can reopen. Thank you.

AaronRobinsonMSFT avatar Apr 08 '20 16:04 AaronRobinsonMSFT