Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Reference added but Namespace is not recognized

Tags:

namespaces

c#

I added a DLL to my project. The DLL contains the namespace test.security. Now, test.security is not recognized. Why is this?

I am using this DLL in other projects and I have no other problems.

like image 825
maryam Avatar asked Jul 16 '11 05:07

maryam


People also ask

How do you resolve the type or namespace could not be found?

A type or namespace that is used in the program was not found. You might have forgotten to reference (References) the assembly that contains the type, or you might not have added the required using directive. Or, there might be an issue with the assembly you are trying to reference.

Why am I getting error CS0246 the type or namespace name could not be found?

error CS0246: The type or namespace name `________' Could not be found. Are you missing a using directive of assembly reference? This error is caused when the namespace that you are trying to use does not exist.

How do I create a namespace in Visual Studio?

To add an imported namespaceIn Solution Explorer, double-click the My Project node for the project. In the Project Designer, click the References tab. In the Imported Namespaces list, select the check box for the namespace that you wish to add. In order to be imported, the namespace must be in a referenced component.

How do you add references to system management?

Right click on the references in your project. Click Add Reference. Select the file (Project Root > Bin > System. Management.


1 Answers

1.remove the reference and add it again 2.Close the solution and re-open it 3.Create a new solution and add all old ones in it

like image 65
Lost_Painting Avatar answered Sep 28 '22 09:09

Lost_Painting