Two versions of assembly installed - How do I use the latest?

Discussion in '.NET' started by vakuumbarn, Sep 5, 2007.

  1. vakuumbarn

    vakuumbarn

    Joined:
    Sep 5, 2007
    Messages:
    1
    I am deploying a Asp.Net 2.0 web site to a web hosting server which has the older assembly 1.0? of the MySql connector installed.

    I, however, want to use the newer assembly.

    I put the MySql.Data.dll in the /bin folder and added:

    <assemblies>
    <add assembly="MySql.Data, Version=5.0.8.1, Culture=neutral, PublicKeyToken=C5687FC88969C44D"/>
    </assemblies>

    and

    <DbProviderFactories>
    <add name="MySQL Data Provider" invariant="MySql.Data.MySqlClient" description=".Net Framework Data Provider for MySQL" type="MySql.Data.MySqlClient.MySqlClientFactory, MySql.Data, Version=5.0.8.1, Culture=neutral, PublicKeyToken=c5687fc88969c44d" />
    </DbProviderFactories>

    to web.config.

    This makes the MySqlDataProvider work perfect with the GridView for example, but trying to use for example MySql.Data.MySqlConnection gives me this error:

    Compiler Error Message: CS0433: The type 'MySql.Data.MySqlClient.MySqlConnection' exists in both 'c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\***\MySql.Data.DLL' and 'c:\WINDOWS\assembly\GAC_MSIL\MySql.Data\1.0.7.20926__3af0010c4c54ea1c\MySql.Data.dll'

    Not too strange I guess, since there is one older dll in the GAC and a newer one in my bin folder. But how do I reference only the newer one!?

    Keep in mind I don't have direct access to the server, only to my "site folder"...
    vakuumbarn, Sep 5, 2007
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Qwert

    Different .net versions installed.

    Qwert, Nov 1, 2005, in forum: ASP .Net
    Replies:
    6
    Views:
    2,207
    =?Utf-8?B?QW1hZGVsbGU=?=
    Nov 14, 2005
  2. Eidolon
    Replies:
    0
    Views:
    1,991
    Eidolon
    Jun 26, 2003
  3. Alec Taylor
    Replies:
    0
    Views:
    227
    Alec Taylor
    Sep 14, 2011
  4. Yasutaka Ito
    Replies:
    0
    Views:
    127
    Yasutaka Ito
    Aug 16, 2004
  5. mark
    Replies:
    1
    Views:
    104
    Michael Winter
    Dec 6, 2004
Loading...

Share This Page