Skindeep2366
Skindeep2366

Reputation: 1559

Deploying Winforms Application to Client Machines Application Failing on start

This is Edited from the OP. This is a VB .NET 4.0 WinForms application. There is a mysql datasource involved with this project. The target CPU is set to any. Problem: When running this application on any computer that has VS 2010 installed along with the mysql connector it runs flawlessly. When installing on a virgin system(ie. No developer environment installed) but that machine does have .net framework 4.0 installed and a mysql server without the connector installed the application falls immediately. So to fix the issue I install the mysql connector MSI. This immediately fixes the issue on the client system and it runs. The problems is that as you can see below from my Installer setup that the 2 needed DLL files for MYSQL are actually included in the installation package so should not need to be installed separately. So Why is it that using that installer from the images do I need to install the mysql connector? Any Ideas? Below is a screen shot of the References the program uses and from what I believe I do not need to deploy any of those DLL files with my application other than the 2 MYSQL DLL files. So why is this failing?? Below are images showing the project references as well as the Installer Files that are being installed in the applicaiton folder. As shown in the image the 2 mysql dll files are to be put in the application folder. There is also a screen shot showing each dll's properties for in application folder.

References Application Installation Files MySQL.Data.DLL Settings MySQL.Data.Entity.DLL Settings

Upvotes: 1

Views: 1661

Answers (1)

David Anderson
David Anderson

Reputation: 13670

You answered your own question.

but that machine does have .net framework 4.0 installed and a mysql server without the connector installed the application falls immediately.

You don't need to install the connector msi package, but you do need to include the two DLL files in the application's directory. Anytime you have some dependency, you need to deploy it with your application.

Edit solution quoted from my comment:

From your update it sounds like you have a version mismatch on the assemblies, and the references are set to Specific Version = True. Check the version number of the assemblies on your developer machine in the output directory, and check the version you are installing on the client system. (You can just hover over the DLL to read the version on the ToolTip). You can try to set Specific Version to false by right clicking your reference and selecting properties, or simply ensure you deploy the same version of assemblies. Your program is looking for the versions its compiled against

Upvotes: 1

Related Questions