The type or namespace name "XXXX" cannot be found (is the using instruction or assembly reference missing ?), Xxxxusing

Source: Internet
Author: User

The type or namespace name "XXXX" cannot be found (is the using instruction or assembly reference missing ?), Xxxxusing

[C # error] the type or namespace name "" is not found (is the using instruction or assembly reference missing ?)

1 symptom: No type or namespace name "" is found during project compilation (is the using instruction or assembly reference missing ?)

Solution:

1. If the type is not found, check whether the namespace of the type is referenced and use the using command.

If the namespace is not found, check whether the Assembly is referenced. If you confirm that the Assembly is referenced, check whether the Assembly version and project are consistent. For example, your project is. net 4.0, and your assembly is.. net 3.5, or your referenced project and referenced project. the. NET framework version is different. For example. NET 4.0, the other is.. NET 4.0 Client Profile.

 

 

2. the namespace of the class in the App_Code folder in the project prompts that the type or namespace name "XXXX" cannot be found when using XXXX is added to the page (is the using command or assembly reference missing ?) The generating operation attribute of the class file to be referenced is not selected for compilation, and vs does not recognize this namespace.

Modify: Right-click the class file-> properties-> Generate operation-> change "content" to "compile", and then generate the file again to solve the problem.

 

3. In another case, multiple class libraries exist in the project. when a project is generated, the system prompts that the type or namespace name "XXXX" is not found (is the using instruction or assembly reference missing ?) Find the "Reference" folder in the corresponding class library, add the corresponding dll file in it, and generate such a library separately. If the prompt is still displayed, check whether the dll files generated by referencing other class libraries exist. If yes, make sure that the class libraries that generate the dll files can be generated normally, and so on, finally, the entire project is generated.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.