philr
philr

Reputation: 1940

Errors in Unity console but not in Visual Studio?

I recently upgraded my Unity C# project's .NET version from 3.5 to 4.5.2. Everything compiles beautifully in my Visual Studio project, but i have errors in my Unity Console which are not showing in VS and these errors are prohibiting me from running my project. It seems as though my project didn't actually upgrade to 4.5.2, is there any way to solve this?

enter image description here

EDIT: i've tried upgrading unity's framework version by going into Edit -> Project Settings -> Player -> Configuration -> Scripting Runtime Version and changing that value to .NET 4.x Equivalent but it changed nothing

Upvotes: 1

Views: 2200

Answers (1)

slaphshot33324
slaphshot33324

Reputation: 658

Do you have a copy of the MySql.Data.dll in your Assets folder? References in Unity work differently than in Visual Studio. You add a reference in Unity by dropping the .dll into the Assets folder (preferably in a directory that makes sense, not at the root so that it is easy to find and doesn't clutter the root). You should always get your code working in Unity first and then compile in Visual Studio, not the other way around.

Upvotes: 3

Related Questions