Visual Studio 2010 is presenting some odd behaviour to do with circular dependencies, and as far I'm concerned... it's LYING; and I wonder if you can help me to sidestep it or point out my ignorance.
Essentially, I have assembly called REM that references nothing other than standard .NET DLL's,开发者_开发知识库 and an assembly called COR that references .NET assemblies and some other projects in the solution (none of which reference REM).
I want to have COR reference REM, but visual studio complains about a circular dependency and I just cannot figure out why.
Any help would be greatly appreciated.
Thanks, Clint.
Make sure you clean and rebuild both projects (You might also try closing and re-opening the project or solution, or even restart VS to make it reload the projects properly).
If you can't figure it out from VS, you might try using a decompiler to see what the actual DLL realy is referencing. (See for instance Just Decompile by Telerik, available from the bottom of this page: http://www.telerik.com/download.aspx ) Open the DLL-files, and you should be able to see what each of them references.
It turns out that even though REM held no explicit reference to COR; the project dependencies dialog against the solution had it that REM depended on COR (goodness knows why). "Removing" that dependency resulted in the reference being successfully added.
I hit the same case today - I had a project A that previously was refernciong B, but that reference was then later removed from the project -- only to still linger in the Solution dependency list, generating a fake dependency.
精彩评论