The reason for this exception may be that the corresponding assembly is not introduced into the project. Generally speaking, the problem is solved after the required assembly is introduced. Sometimes there is a strange problem. For example, project B is a class library. Project a refers to the class of project B, such as userservice. Project B is also introduced into the reference of project A. However, when compiling in project a, an error is reported, saying that the type or namespace name ‘userservice’ does not exist in the namespace ‘xxx’ (are you missing an assembly reference?)
Now, for example, is there anything related to warning
The referenced assembly ” XXX.Service.dll ” could not be resolved because it has a dependency on ” System.ServiceModel.Web , Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35″ which is not in the currently targeted framework “.NETFramework,Version=v4.0, Profile=Client”. Please remove references to assemblies not in the targeted framework or consider retargeting your project.
That is to say, because the Framework version used by project a and project B is different, the class of a cannot be used in project B. At this point, as long as the Framework version of the project is reset to make the two projects consistent, the problem is solved.
Read More:
- .NETproject compilation error. Type or namespace name could not be found. Visual studio automatically introduces dependency package (shortcut key)
- [Solved] Error: package or namespace load failed for ‘ggplot2’ in loadNamespace(i, c(lib.loc, .libPaths()), v
- Abnormal [System.InvalidOperationException: custom type mapping for ‘xxx’ is not specified or is not a solution
- [Solved] Error: ‘attrition‘ is not an exported object from ‘namespace:rsample‘
- OpenCV(-206:Bad flag (parameter or structure field)) Unrecognized or unsupported array type [How to Solve]
- [Solved] TypeError: super(type, obj): obj must be an instance or subtype of type
- [Solved] Kettle Error: ../deploy does not exist, please create it.
- Feign declarative call service feign.codec.DecodeException: Error while extracting response for type [class **] and…
- [Solved] Lumen Error: Class redis does not exist
- [Solved] Warning: using directive refers to implicitly-defined namespace ‘std’
- Postgres uuid_generate_v1() does not exist [How to Solve]
- How to Solve Error: Missing type map configuration or unsupported mapping
- [Solved] No tf data. Actual error: Fixed Frame [world] does not exist
- PostgreSQL insert data error: column “XXX” does not exist solution
- Room DB Error: AppDatabase_Impl does not exist [How to Solve]
- [Solved] The idea Lombok error: Method does not exist
- [Solved] kubelet Startup Error: cannot find network namespace for the terminated container
- [Solved] Vscode debug error launch: Program “path” does not exist
- [Solved] error: package android.support.design.widget does not exist
- How to Solve Error: Resource’/Servers’ does not exist