This looks like a bug by microsoft, it is pretty annoying and I'm wondering if anyone has a solution, or maybe I'm doing something wrong (And in this case, what am I doing wrong and how to do it right)
I have noticed that on several user controls that I've created... some projects that had the user control on a form were giving this error when opening the solution... it will happen if the form that contained the user control was opened.
Closing the form and reopening it would "fix" the problem (The error will be gone).
At first I thought I did something wrong and started investigating... after I didn't find anything I did some tests and in one of them I found out that removing one of the projects from the solution and then adding it back solved the problem... Off course this has no sense so I started checking why got changed... It seems that the only difference is in the Solution file.
I've made a simple example:
(Sorry for the stupid/weird names... I've ran out of reasonable names)
Open BigMike solution. You should see that you get an error
Open BigMike2 solution. You should see that it opens OK without any error.
The only difference between those 2 is the order of the projects in the solution, which ultimately cases the error:
Could not load file or assembly 'RedEye, Version=220.127.116.11, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specified.
Instances of this error (1)
1. Hide Call Stack
It claims that it fails on the constructor.
I see no reason why the projects order would prevent loading an assembly.
I'm using Visual Studio 2008 if that matters.