Multiple Versions of MyDirect on Same Server?

Discussion of open issues, suggestions and bugs regarding ADO.NET provider for MySQL
Post Reply
lgriffin
Posts: 14
Joined: Fri 09 Jun 2006 20:46

Multiple Versions of MyDirect on Same Server?

Post by lgriffin » Wed 30 Jan 2008 21:45

Hi,

I have version 3.5 running on my server with about 20 sites using that version. I just upgraded to version 4.3 yesterday ( 1/30/08 ). When i load up Visual Studio and add 4.3 to the web.config, I'm getting the following error:

Compiler Error Message: BC30560: 'MySqlDataAdapter' is ambiguous in the namespace 'CoreLab.MySql'.

I'm not an expert, but I'm guessing that since version 3.5 is installed in the GAC, the new version is having some sort of conflict. So my question is this:

Can i keep both versions on the server ( for all those sites that are running 3.5, and create new sites with 4.3? ) If so, how ?

Alexey.mdr
Posts: 729
Joined: Thu 13 Dec 2007 10:24

Post by Alexey.mdr » Thu 31 Jan 2008 09:48

You can keep both versions on the server, but you need either to delete the policy file or to store needed libraries in the bin folder (not in GAC).

lgriffin
Posts: 14
Joined: Fri 09 Jun 2006 20:46

Post by lgriffin » Thu 31 Jan 2008 12:59

How does one "delete the policy file" ?

lgriffin
Posts: 14
Joined: Fri 09 Jun 2006 20:46

machine.config

Post by lgriffin » Thu 31 Jan 2008 13:06

Do these entries in the macine.config have any impact on the "ambiguous" statement?





lgriffin
Posts: 14
Joined: Fri 09 Jun 2006 20:46

One more thing

Post by lgriffin » Thu 31 Jan 2008 13:44

Oh one more thing,

I can't delete the machine.config file itself if that's what you mean by the "policy file" because there's other global settings stored in there that i need.

lgriffin
Posts: 14
Joined: Fri 09 Jun 2006 20:46

Adding .dll to Bin Folder

Post by lgriffin » Thu 31 Jan 2008 14:01

Okay,

Adding the appropriate .dll to the bin folder seems to be working for me, thanks for that. Now i have one more problem for you :)

In Visual Studio 2008, if i goto the App_Code folder, try to add a new Dataset.xsd, then select "Query Builder", i get the following error:

"Value cannot be null. Parameter name: connection"

What does this mean? I've done this countless times with VS 2005 + the older version of MySQLDirect.NET i mentioned earlier. Please advise.

Alexey.mdr
Posts: 729
Joined: Thu 13 Dec 2007 10:24

Post by Alexey.mdr » Thu 31 Jan 2008 14:04

How does one "delete the policy file" ?
Delete all assemblies with the name “policy.4.*.CoreLab.MySql” from your server's GAC.

Say, I had several versions being installed on my machine. Without a policy assembly in my GAC it would be just a disaster waiting to happen.
Following the idea I'd have these assemblies in GAC:
policy.2.1.CoreLab.MySql
policy.2.35.CoreLab.MySql
policy.3.30.CoreLab.MySql
policy.4.38.CoreLab.MySql <--- delete
policy.4.3.CoreLab.MySql <--- delete

In your particular case you want to get rid of two last assemblies.
This will make redirect from all older versions to version 3.30
Make sure you will place libraries into bin folder in your next projects. This process is described in the “Deployment” topic of the supplied help.

Policy files allow versions management, which is a pretty neat philosophy.
Here you can get additional information about policy files.
http://www.informit.com/guides/content. ... seqNum=362

lgriffin
Posts: 14
Joined: Fri 09 Jun 2006 20:46

Removed Assemblies

Post by lgriffin » Thu 31 Jan 2008 15:23

Hi, i removed those assemblies from the GAC. I'll let you know what happens...

lgriffin
Posts: 14
Joined: Fri 09 Jun 2006 20:46

Didn't work...

Post by lgriffin » Thu 31 Jan 2008 20:00

For what it's worth i cant seem to have multiple versions of this product installed on my machine and get them to play nice together.

If you'd like to give an extremely detailed method on how to do this, great, please let me know, but as it stands right now, I have the latest version running on my machine but if i install other versions i get that ambiguity error.

Alexey.mdr
Posts: 729
Joined: Thu 13 Dec 2007 10:24

Post by Alexey.mdr » Fri 01 Feb 2008 13:28

There are two options:
1. On the server side you make Minimal installation of MyDirect .NET v. 3.*.
Remove any MyDirect .NET v. 4.* installations.
Now your web sites are automatically redirected to use the libraries v. 3.*
You can deploy new web sites that use assemblies v. 4.*, but make sure you have got all essential MyDirect .NET libraries in the bin folder.
2. On the server side you make Minimal installations of MyDirect .NET v. 3.* and MyDirect .NET v. 4.*
Delete all policy files like: “policy.4.*.CoreLab.MySql”

You have got
Compiler Error Message: BC30560: 'MySqlDataAdapter' is ambiguous in the namespace 'CoreLab.MySql'.
on the developer machine, haven't you?
Check web.config for referencing two libraries with the same name, though with not identical versions.
Leave only one reference to the required version.

Post Reply