0

I'm using VS2019 and today I opened my project to continue working but a strange error occured that I really don't understand. The MySql.Data.MySqlClient namespace shows this:

mysql namespace

and every mysql commands shows this error:

error list

but when I start the debugging it's working fine i don't know whats causing this since I'm not very knowledgeable with programming. How do I get rid of this?

3
  • Try right click on solution then click Clean Solution. After cleaning right click again and click Rebuild Solution Commented Jan 14, 2020 at 2:49
  • @F0r3v3r-A-N00b it worked after refreshing the project thank you so much!! May I know what caused this error? Commented Jan 14, 2020 at 3:08
  • It seems that the reference to the MySQL library was not being read properly. It would be a bug in VS but such transient issues are hard to track down and probably not worth the effort if they can't be reproduced. Suffice it to say that it probably wasn't anything you did wrong. Commented Jan 14, 2020 at 3:27

1 Answer 1

0

From your scenario it's bit unclear what exactly problem at your end. You could try couple of hacks though

  1. Clean solution and rebuild your project

If that does not resolve your issue, try to remove dll reference "MySql.Data.MySqlClient" from reference and referring to latest documentation from Microsoft, import correct namespace again. Hope this helps you.

Sign up to request clarification or add additional context in comments.

1 Comment

I also thought of removing dll reference but I was afraid it would cause bigger errors. Cleaning, rebuilding and then refreshing the project worked tho. Thanks!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.