Wahtever
Wahtever

Reputation: 3678

asp.net Compilation Error (mysql.data)

i have an error when trying to start default.aspx.

Compiler Error Message: CS0433: The type 'MySql.Data.MySqlClient.MySqlConnection' exists in both 
'c:\Windows\assembly\GAC_MSIL\MySql.Data\6.3.6.0__c5687fc88969c44d\MySql.Data.dll' and 'c:\Windows\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\elwazefa\fd12d8de\3446c68c\assembly`\dl3\dc121b8b\00d6e0c3_62aacb01\MySql.Data.CF.DLL'`

i am using asp.net 3.5 what is the problem, thanks

Upvotes: 0

Views: 1989

Answers (2)

Katie Kilian
Katie Kilian

Reputation: 6993

It looks to me like you have references to both the Compact Framework and the standard framework MySQL libraries in your project. You need to remove the references to the ones that have .CF in their filename.

Upvotes: 4

Grant Thomas
Grant Thomas

Reputation: 45083

Check your web.config file assemblies section for multiple references:

<compilation>
  <assemblies>
    ...             
  </assemblies>
</compilation>

If there is more than one then remove it (the one not in the GAC, I would say off-hand.)

Also, as @Abe suggests, delete the temporary files under the following path:

c:\Windows\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\

Upvotes: 0

Related Questions