0

When I execute my stand alone program it crashes and says:

Exception: System.IO.FileNotFoundException: cannot find assembly or file Mysql.Data  or load one of the dependable sources at project3.class.executesend<> at project3.class.initialize<> at project3.class.main<>

After some searching I found out that I should add those .dll files as resources with the program. After I did that, it produced the same error.

How can I fix this?

3
  • 1
    You don't add the DLLs as resources - you just provide them alongside your application, in the same directory... Commented Jan 31, 2013 at 21:32
  • So i have to manualy send them along with the .exe they run ? Commented Jan 31, 2013 at 22:09
  • Yes, that's right. Or build a setup project... Commented Jan 31, 2013 at 22:10

2 Answers 2

3

You added Mysql.Data in your project's references folder, if I understood well.

Now, right click on this in VS Explorer, go to properties, and set Attribute "Copy Local" to true.

So it will be copied in the "debug" or "release" folder whenever you build your app.

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

2 Comments

do i have to manualy include those with the .exe file or are they automaticly included along with it ?
if you set "Copy Local" to true, this will be done for you. Or you can let "Copy Local" to false and add them manually... Useless to say that first solution is easier.
0

For version 8.0.19 of MySQL Workbench, I needed to install the Visual C++ 2015-2019 DLLs.

I had 2008, 2010, 2013 and 2015 installed, with both x64 and x32 flavors, and was getting this error.

Visual C++ Redistributables are here ...

https://support.microsoft.com/en-us/help/2977003/the-latest-supported-visual-c-downloads

Comments

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.