- Joined
- Sep 5, 2007
- Messages
- 1
- Reaction score
- 0
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"...
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"...