Upgrade problems from 2.6 to 3.3

Hello,

About a year ago my company created a game in Unity 2.6. Recently we decided to upgrade and I wanted to try to do pull in the game into the new 3.3 Version.

I only get one error, but that’s more then enough. I have tried exploring what it could be, but have had no luck with the fixing solutions I have found so far. I am hoping someone can enlighten me!

I am getting a Internal compiler error, here is what I think is the important part of the editor log, if something more is needed please let me know!


-----CompilerOutput:-stdout–exitcode: 1–compilationhadfailure: True–outfile: Temp/367b8b2ef1f0c254080b607fbb642a9c.dll

The following assembly referenced from C:\Users\Mgafron\Desktop\New Unity Project\Assets\Plugins\MySql.Data.dll could not be loaded:

Assembly: System.Drawing (assemblyref_index=3)

Version: 1.0.5000.0

Public Key: b03f5f7f11d50a3a

The assembly was not found in the Global Assembly Cache, a path listed in the MONO_PATH environment variable, or in the location of the executing assembly (C:\Users\Mgafron\Desktop\New Unity Project\Assets\Plugins).

Could not load file or assembly ‘System.Drawing, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a’ or one of its dependencies.

Missing method .ctor in assembly C:\Users\Mgafron\Desktop\New Unity Project\Assets\Plugins\MySql.Data.dll, type System.Drawing.ToolboxBitmapAttribute

Can’t find custom attr constructor image: C:\Users\Mgafron\Desktop\New Unity Project\Assets\Plugins\MySql.Data.dll mtoken: 0x0a00014f

-----CompilerOutput:-stderr----------

Unhandled Exception: Mono.CSharp.InternalErrorException: Assets/Plugins/MainWindow.cs(25,14): MainWindow —> Mono.CSharp.InternalErrorException: Assets/Plugins/MainWindow.cs(81,36): MainWindow.dbConnection —> System.IO.FileNotFoundException: Could not load file or assembly ‘System.Drawing, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a’ or one of its dependencies.

File name: ‘System.Drawing, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a’


Obviously something seems funky with MySql.data.dll. But its in the right place, and my code compiles just fine in Microsoft visual studios. Even some direction as to what might be wrong would be appreciated. Thanks!

Compiles fine in VS has no implications on Unity as unity does not use nor even support the microsoft frameworks.

Generally the problem is that you try to use System.Drawing or the function you try to use at least does. Ensure in the player settings that you aren’t using .NET 2.0 subset but the full thing, if it still not works, look for an alternative function that does not try to use System.Drawing at all as the drawing / forms related stuff is limited and/or cut completely depending on the aspect

Double checked the subnet, but to no avail :rage:!

So is my problem the System.Drawing then? What is this part talking about then?

Missing method .ctor in assembly C:\Users\Mgafron\Desktop\New Unity Project\Assets\Plugins\MySql.Data.dll

Thought maybe something was going weird with my MySqlData.dll

The two lines above it both refer to System.Drawing as root, in detail it seems it just can’t find it which is very well possible.

Question is what you are using in detail to hit that, don’t recall having that seen but I also haven’t tried using MySQL lately anymore so perhaps the dll itself was updated to use that and you might be force to look for an different version of the assembly itself.
And no idea why it would need system.drawing, really …

Ok im getting some where now. When I removed simply this one line, everything was fixed.

private static MySqlConnection dbConnection;

Now naturally that’s because the MySql.Data is related to this class. But at the very least I am getting somewhere with it now.

I guess what I am confused by is, why would this class work perfectly fine in 2.6, but not in 3.3? Any ideas? How is System.Drawing working into this.