I have a solution that contains a website and a class library in Visual Studio 2008.
I then have another web site project outside of the solution that needs to refe
I had similar issue. What worked for me is that I had added wrong Class Library from visual studio. I added by using the search feature of visual studio.
What I needed to do was Add New Project > Visual C# > Class Library. And this newly added class library is the right one and can now be added as reference to any project.
I had a similar problem, will all my references being buggered up by Resharper - The solution which worked for me is to clear the Resharper Cache and then restarting VS
tools->options->resharper->options-> general-> click the clear caches button and restart VS
Since they are both in the same solution, instead of adding a reference to the DLL, add a reference to the class library project itself (the Add Reference dialog will have a tab for this).
Ahh, it's a different solution. Missed that. How about you try instead of adding a reference to the project affffding a reference to the compiled DLL of your class library. The Add Reference dialog has a Browse tab which does this.
I found how to fix this issue (for me at least). Why it worked, I'm not sure, but it did. (I just tried against a second website that was having the same problem and the following solution worked for that as well).
I tried the normal cleaning of the projects and rebuilding, shutting down all my Visual Studio instances and restarting them, even tried restarting my computer.
What actually worked was opening up the project in Visual Studio, closing all the open tabs, and then shutting it down.
Before I had left the tabs open because I didn't think it mattered (and I hardly ever close the tabs I'm using).
If you're referencing assemblies for projects that are in the same solution, add a Project reference (using the "Projects" tab) rather than browsing for the dll in the \bin\Debug (or \bin\Release) folder (using the "Browse" tab). See screen shot below. Only browse for the assembly/dll file if it's considered an external assembly.
I had a similar issue in VS 2010, when creating a test project for an MVC 2 application. The symptoms were identical.
The message from ReSharper was somewhat misleading. For a moment I completely ignored ReSharper and did it the "manual VS way":
At this stage I got a compilation error: I should have referenced the System.Web.Mvc
assembly in my test project (sigh). Adding this reference causes the project to compile. The ReSharper issues remain, but the ReSharper test runner works.
When I restart VS, the ReSharper errors are gone too. I'm not sure if the restart is required - simply closing the .cs file might be enough.
From now on, when I see the ReSharper message
Failed to reference module. Probably, reference will produce circular dependencies between projects.
I'll read
Failed to reference module. Probably, reference will produce circular dependencies between projects, or you are missing some references to dependencies of the reference's dependencies.