I'm trying to connect to a MySQL database through Unity. I've added a reference to System.Data in visual studio but unity is throwing the following error:
TypeLoadException: Could not load type 'System.Runtime.ExceptionServices.HandleProcessCorruptedStateExceptionsAttribute' from assembly 'System.Data'.
I've googled how to solve this issue, or what it actually means, but I can't find anything.
Is anyone able to shed some light on this and what I should do to fix it?
Unity is using mono, not .NET. Because HandleProcessCorruptedStateExceptionsAttribute
is a class from the .NET-framework 4.5, Unity can't load this class. You need to tell Visual Studio, that is mustn't compile against .NET-framework 4.5, but instead, you need to specify version 3.5 in your project-settings.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.