The type or namespace name does not exist in the namespace, etc.
Visual Studio 2012.
I have two projects A and B. A is a console application. By default, the namespace A is "PayT". B is the class library type, the sAssembly name is "RetentionPolicyManager", and the default namespace for B is "RetentionPolicyManager".
Now in project A, I have added a reference to B which is RetentionPolicyManager.dll.
One class A has one line:
using PayT.RetentionPolicyManager;
However, I always got the error when rebuilding the solution:
The type or namespace name "RetentionPolicyManager" does not exist in the namespace "PayT" (are you missing an assembly reference?)
If I don't build a solution, it looks like everything is fine and errors.
I faced the same problem a few months ago. The problem was that both projects were not targeting the same platform , meaning the console application was targeting .Net framework 4.0 Client Profile
, whereas the library was targeting full .Net framework 4.0
.
Fixed by setting full .NET 4.0 environment for both projects.
source to share