0

Ok, I am desperate: I am trying to access a MariaDB installation from C# under Unity3D using Rider2020. After installing the MySqlConnector 1.1.0 (or 1.0.0 as well) via NuGet I can see the package has been added. NuGet display after installing MySqlConnector

However when I try to use the "using" directive for it, the system can at first find it.

Rider shows the using in regular color signaling that it knows "MySqlConnector"

The entry in the references is clearly visible

But when I save the file, the entry is deleted from the references! And subsequently the buid fails.

After "save" the entry disappears from the references

I have been experimenting for 4(!) days now un/reinstalling both VS2019 and Rider. Without any result. I have to note that this does not only concern this package but also MySql.
So it probably is not related to the package. The removal only happens when I opened the source from the Unity3D editor. If I just use Rider to edit the source file, saving does not remove the reference. So it seems obvious that Unity is causing this.

I am aware of this StackOverflow question: Nuget package installed but references not resolved but trying the approaches there did not solve my problem.

Any ideas?

Rachmaninow
  • 63
  • 1
  • 9

1 Answers1

0

The answer is that the Unity editor does not support NuGet. I used NuGetForUnity (on GitHub) instead - and it magically worked!

Rachmaninow
  • 63
  • 1
  • 9