Page 1 of 1

Multiple Versions of MyDirect on Same Server?

Posted: Wed 30 Jan 2008 21:45
by lgriffin
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 ?

Posted: Thu 31 Jan 2008 09:48
by Alexey.mdr
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).

Posted: Thu 31 Jan 2008 12:59
by lgriffin
How does one "delete the policy file" ?

machine.config

Posted: Thu 31 Jan 2008 13:06
by lgriffin
Do these entries in the macine.config have any impact on the "ambiguous" statement?





One more thing

Posted: Thu 31 Jan 2008 13:44
by lgriffin
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.

Adding .dll to Bin Folder

Posted: Thu 31 Jan 2008 14:01
by lgriffin
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.

Posted: Thu 31 Jan 2008 14:04
by Alexey.mdr
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

Removed Assemblies

Posted: Thu 31 Jan 2008 15:23
by lgriffin
Hi, i removed those assemblies from the GAC. I'll let you know what happens...

Didn't work...

Posted: Thu 31 Jan 2008 20:00
by lgriffin
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.

Posted: Fri 01 Feb 2008 13:28
by Alexey.mdr
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.