0

I am unable to compile a .Net application.

The compiler gives the below error :

" /.../, error CS0246 : type or namespace 'MySql.Data' was not found. Are you missing an assembly reference ? /.../"

I'm using VSCode to do that. I tried making sure the .csproj file was in fact referencing the NuGet package, and all. I don't know what's the argument to reference a package defined in a .csproj, any help? Thanks a lot.

sbkrogers
  • 1,291
  • 12
  • 25
  • just add a reference to MySql.Data – Vivek Nuna Jun 05 '20 at 11:21
  • Dude i said it in my post : i have made sure it was in fact referencing the mysql.data Unless you're talking about an actual VS reference ? – reNemesic Jun 05 '20 at 11:24
  • 1
    Have you installed the [nuget](https://www.nuget.org/packages/MySql.Data/) itself? Ho to do it in vs code you can see [here](https://stackoverflow.com/q/40675162/2501279) for example. – Guru Stron Jun 05 '20 at 11:56
  • Have you restored the packages for the project? If you are building without restoring packages, then even though you have a reference, you may not have the actual assemblies for the package. – JamesFaix Jun 05 '20 at 13:15
  • @JamesFaix nope, I made sure I restored everything and even ran dotnet build but still the same error. I gave up already anyway. – reNemesic Jun 07 '20 at 09:29

0 Answers0