Dear all

i have created a small windows form application, which connect to mysql database, and the database is installed on a remote pc( virtual machine), i am using visual studio 2010 in winxp 32 bit , and i have build this application using .NET2.0, so that it can work on all version of windows later, after compiled i have made installer with the help of installshield software which is integrated inside the vs2010, after making a installer i take this to another remote machine win xp and installed there, no issue , after installing i opened my software no issue , but when i press the update button it gives me this type or error " Could not load file or assembly 'MySql.Data,' or one of its dependencies. " long error i am not able to solve this problem tried over the net but no success till now..

please help me out

regards

You'll need to include the MySql assemblies in your install, or install them separately.

hey momerath thnx for reply indeed, but i dnt understand wht you mean to say , i have installed my mysql assemblies , connector in my system .. and where to include the assemblies ,

I think Momerath is saying this:
You can either install MySql Connector on the machine where you are using the application, or include the dll files for MySql connector in your installer so they are copied over to the machine where you are installing.

dear pitic ,
i have already added the dll files in the installer , ...

Did you install the MySql Connector on the machine where you are using the application? As i recall, a while back when using mysql and c# I had to install the connector everywhere.

Are the dll files being copied to the correct directory by the installer? They will need to be in the same folder as the executable. Also make sure that any dependencies that MySql.Data has are also included in the installer and get installed into the same directory as MySql.Data.

dear

agree to you , but can you tell mysql.data.dll need what dependies ,now i am facing another issue , when i install application on remote pc from the menu when i launched it gives me error, and when i open application from program files it works and even when i send apps shortcut to desktop then also it works ,, now i dnt knwo wheere i am doing wrong here ..

In Visual Studio where you are creating the installer, you should have a dependencies section where all the DLL librarys are listed. You should be able to right click this heading and select "Refresh Dependencies". This will then calculate all your dependencies and add library files if needed. Other than that, I can only suggest installing the MySQL Connector for .NET on the client machines as a seperate install time action (You may have to script it)

Additionally, make sure that the client PC has the correct version of .NET installed. Sometimes the newer operating systems don't have .NET 2.0 installed.

thnx all . .. i have sorted out this issue , i think , ,thnx for support

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.