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 faced this problem, and I solved it by closing visual studio, reopening visual studio, cleaning and rebuilding the solution. This worked for me.
This sounds like a similar issue with ReSharper:
http://www.jetbrains.net/devnet/thread/275827
According to one user in the thread forcing a build fixes the issue (CTRL+Shift+B) after the first build..
Sounds like an issue with ReSharper specifically in their case.. Have you tried building regardless of the warnings and possible false errors?
Another possible fix that just worked for me:
If you have Assembly A, which references Assembly B, both of which reference a non-project (external) assembly X, and Assembly B's code will not recognize that you have referenced X, then try the following steps in order:
Apparently, VS will not recognize a reference to an external assembly in a project that is a dependency of another project that already references the external. By setting up the references again from the ground up, you overcome this. It's just very odd.
I had stumbled upon a similar issue recently. I am working in Visual Studio 2015 with Resharper Ultimate 2016.1.2. I was trying to add a new class to my code base while trying to reference a class from another assembly but Resharper would throw an error for that package.
With some help of a co-worker, I figured out that the referenced class existed in the global namespace and wasn't accessible from the new class since it was hidden by another entity of same name that existed in current namespace.
Adding a 'global::' keyword before the required namespace helped me to reference the class I was actually looking for. More details on this can be found on the page listed below:
https://msdn.microsoft.com/en-us/library/c3ay4x3d.aspx
You may forget to add reference the class library which you needed to import.
Right click the class library which you want to import in (which contains multiple imported class libraries), -->Add->Reference(Select Projects->Solution->select the class library which you want to import from->OK)
After confirming the same version of asp.net was being used. I removed the project. cleaned the solution and re-added the project. this is what worked for me.