I'm going through a bit of a rough time migrating an ASP.NET 2.0 website from a Windows XP (32-bit) machine to a Windows 7 (64-bit) one. There are lot going on but I'll concentrate on the problem at hand.
The problem:
I'm getting an error that says "Could not load file or assemply 'MySQL.Data, Version 5.2.3.0, Culture...' or one of its dependencies."
The thing is: I'm not referencing MySQL.Data Version 5.2.3.0 ANYWHERE in the solution (or at least not that I could find). I have MySQL 6.6 installed on this computer and I'm referencing that in my web.config file. For the life of me I can't find the file that's making a reference to 5.2.3. I've searched the entire solution for "5.2.3" and it's nowhere to be found. I've gone through my config files and MySQL 5.2.3 is nowhere to be found. I've gone through all my *.cs files as well. No 5.2.3. None. Zip! Nada. Yet, when I try to access a particular code file (which has a using MySql.Data.MySqlClient statement), I get the error above.
The stack trace isn't much help. It shows a C# file as the source of the problem. However, like I said above, there is no trace of 5.2.3 on that file. None whatsoever. So I'm a bit confused as to where the 5.2.3 assembly is being referenced.
The stack trace is below:
And this too:
Background and more details:
Like I said above, I'm trying to migrate a site from an XP (32-bit) computer to a Windows 7 (64-bit) one. At first, I simply tried to open the website on the new, Windows 7 computer but that didn't work. Visual Studio 2008 would freeze immediately after opening the solution, and I had to shut it down. So I decided to create the website from scratch and add the different files, folders, and assemblies one at a time, fixing problems as I encountered them.
In the original machine, I do have MySQL 5 installed. However, when switching to the new one, I wanted to move to MySQL 6. The references on the old machine all point to MySQL 5.2.3, so of course there's some kind of invisible reference somewhere which I can't find.
The error happens when I click a Log In button, which points to a page inside a folder that uses Windows Forms authentication. When I click the button, Windows Forms authentication should display the Login.aspx page and that is where the error happens.
The solution contains two projects. One project is the website files (aspx and the like). The other project is class library I created which contains multiple classes related to my business logic, database access and the like. That project has a reference to MySQL and that reference is version 6, not 5. A class from that project is accessed in the Login.aspx.cs file so there might be some connection there. But again, everything points to MySQL version 6, so I don't understand why/how/where the reference to version 5.
My System:
On the new machine:
[ul]
[li]Windows 7 (64-bit) SP1[/li]
[li]Visual Studio 2008 Website[/li]
[li]Website runs from the file system using built-in[/li]
[li]Visual Studio Web Server Website is ASP.NET 2.0 (tried to create using 4.0 but gave up)[/li]
[li]MySQL 6[/li]
[li]Crystal Reports and other stuff which cause lots and lots of problems[/li]
[/ul]
On the old machine
[ul]
[li]Windows XP[/li]
[li]Visual Studio 2008[/li]
[li]Website runs from IIS[/li]
[li]Website is ASP.NET 2.0[/li]
[li]MySQL 5[/li]
[li]Crystal Reports and lots of other stuff which works smoothly[/li]
[/ul]
_________________________________
I think, therefore I am. [Rene Descartes]
The problem:
I'm getting an error that says "Could not load file or assemply 'MySQL.Data, Version 5.2.3.0, Culture...' or one of its dependencies."
The thing is: I'm not referencing MySQL.Data Version 5.2.3.0 ANYWHERE in the solution (or at least not that I could find). I have MySQL 6.6 installed on this computer and I'm referencing that in my web.config file. For the life of me I can't find the file that's making a reference to 5.2.3. I've searched the entire solution for "5.2.3" and it's nowhere to be found. I've gone through my config files and MySQL 5.2.3 is nowhere to be found. I've gone through all my *.cs files as well. No 5.2.3. None. Zip! Nada. Yet, when I try to access a particular code file (which has a using MySql.Data.MySqlClient statement), I get the error above.
The stack trace isn't much help. It shows a C# file as the source of the problem. However, like I said above, there is no trace of 5.2.3 on that file. None whatsoever. So I'm a bit confused as to where the 5.2.3 assembly is being referenced.
The stack trace is below:
Code:
[FileNotFoundException: Could not load file or assembly 'MySql.Data, Version=5.2.3.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d' or one of its dependencies. The system cannot find the file specified.]
Login.Page_Load(Object sender, EventArgs e) in c:\Jose\KMWebsite2\Login.aspx.cs:42
System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e) +14
System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) +35
System.Web.UI.Control.OnLoad(EventArgs e) +99
System.Web.UI.Control.LoadRecursive() +50
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +627
And this too:
Code:
=== Pre-bind state information ===
LOG: User = Computer1\Jose
LOG: DisplayName = MySql.Data, Version=5.2.3.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d
(Fully-specified)
LOG: Appbase = file:///C:/Jose/KMWebsite2/
LOG: Initial PrivatePath = C:\Jose\KMWebsite2\bin
Calling assembly : App_Web_lyss4wgv, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null.
===
LOG: This bind starts in default load context.
LOG: Using application configuration file: C:\Jose\KMWebsite2\web.config
LOG: Using machine configuration file from C:\Windows\Microsoft.NET\Framework\v2.0.50727\config\machine.config.
LOG: Post-policy reference: MySql.Data, Version=5.2.3.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d
LOG: Attempting download of new URL file:///C:/Users/Jose/AppData/Local/Temp/Temporary ASP.NET Files/kmwebsite2/49ca7fd8/cb38a83/MySql.Data.DLL.
LOG: Attempting download of new URL file:///C:/Users/Jose/AppData/Local/Temp/Temporary ASP.NET Files/kmwebsite2/49ca7fd8/cb38a83/MySql.Data/MySql.Data.DLL.
LOG: Attempting download of new URL file:///C:/Jose/KMWebsite2/bin/MySql.Data.DLL.
LOG: Attempting download of new URL file:///C:/Jose/KMWebsite2/bin/MySql.Data/MySql.Data.DLL.
LOG: Attempting download of new URL file:///C:/Users/Jose/AppData/Local/Temp/Temporary ASP.NET Files/kmwebsite2/49ca7fd8/cb38a83/MySql.Data.EXE.
LOG: Attempting download of new URL file:///C:/Users/Jose/AppData/Local/Temp/Temporary ASP.NET Files/kmwebsite2/49ca7fd8/cb38a83/MySql.Data/MySql.Data.EXE.
LOG: Attempting download of new URL file:///C:/Jose/KMWebsite2/bin/MySql.Data.EXE.
LOG: Attempting download of new URL file:///C:/Jose/KMWebsite2/bin/MySql.Data/MySql.Data.EXE.
Background and more details:
Like I said above, I'm trying to migrate a site from an XP (32-bit) computer to a Windows 7 (64-bit) one. At first, I simply tried to open the website on the new, Windows 7 computer but that didn't work. Visual Studio 2008 would freeze immediately after opening the solution, and I had to shut it down. So I decided to create the website from scratch and add the different files, folders, and assemblies one at a time, fixing problems as I encountered them.
In the original machine, I do have MySQL 5 installed. However, when switching to the new one, I wanted to move to MySQL 6. The references on the old machine all point to MySQL 5.2.3, so of course there's some kind of invisible reference somewhere which I can't find.
The error happens when I click a Log In button, which points to a page inside a folder that uses Windows Forms authentication. When I click the button, Windows Forms authentication should display the Login.aspx page and that is where the error happens.
The solution contains two projects. One project is the website files (aspx and the like). The other project is class library I created which contains multiple classes related to my business logic, database access and the like. That project has a reference to MySQL and that reference is version 6, not 5. A class from that project is accessed in the Login.aspx.cs file so there might be some connection there. But again, everything points to MySQL version 6, so I don't understand why/how/where the reference to version 5.
My System:
On the new machine:
[ul]
[li]Windows 7 (64-bit) SP1[/li]
[li]Visual Studio 2008 Website[/li]
[li]Website runs from the file system using built-in[/li]
[li]Visual Studio Web Server Website is ASP.NET 2.0 (tried to create using 4.0 but gave up)[/li]
[li]MySQL 6[/li]
[li]Crystal Reports and other stuff which cause lots and lots of problems[/li]
[/ul]
On the old machine
[ul]
[li]Windows XP[/li]
[li]Visual Studio 2008[/li]
[li]Website runs from IIS[/li]
[li]Website is ASP.NET 2.0[/li]
[li]MySQL 5[/li]
[li]Crystal Reports and lots of other stuff which works smoothly[/li]
[/ul]
_________________________________
I think, therefore I am. [Rene Descartes]