The current type is an interface and cannot be constructed. Are you missing a type mapping?
2017-10-16 15:55
1151 查看
错误:
The current type is an interface and cannot be constructed. Are you missing a type mapping?
原因:
在使用DI(dependency injection)依赖注入的时候,忘记注册了。
解决:
注册一下接口和方法
container.RegisterType
The current type is an interface and cannot be constructed. Are you missing a type mapping?
原因:
在使用DI(dependency injection)依赖注入的时候,忘记注册了。
解决:
注册一下接口和方法
container.RegisterType
相关文章推荐
- The type or namespace name 'Bitmap' could not be found (are you missing a using directive or an asse
- .net4 wpf App 使用log4net 错误:The type or namespace name 'log4net' could not be found (are you missing a using directive or an assembly reference?)
- 关于错误 The type or namespace name `Vuforia' could not be found. Are you missing an assembly reference?
- The type or namespace name `MovieTexture' could not be found. Are you missing an assembly reference?
- 如何解决The type or namespace name 'ScriptService' could not be found (are you missing a using directive or an assembly reference?)
- The type or namespace name '***' could not be found (are you missing a using directive or an asse
- The type or namespace name 'log4net' could not be found (are you missing a using directive or an assembly refere
- The final local variable xxx cannot be assigned, since it is defined in an enclosing type
- The final local variable cannot be assigned, since it is defined in an enclosing type
- The final local variable xxx cannot be assigned, since it is defined in an enclosing type
- The final local variable xxx cannot be assigned, since it is defined in an enclosing type
- The type Database cannot be constructed. You must configure the container to supply this value.
- The type OneInterface cannot be a superinterface of OneInterfaceImpl; a superinterface must be an in
- The final local variable xxx cannot be assigned, since it is defined in an enclosing type“
- HTTP Error 404.2 - Not Found "The page you are requesting cannot be served because of the ISAPI and
- Constraints for override and explicit interface implementation methods are inherited from the base method, so they cannot be specified directly
- the android virtual Device AVD2.3.3 is currently running in an emulator and cannot be deleted.
- Compiler Error Message: CS0234: The type or namespace name 'BorderDetails' does not exist in the class or namespace 'Infragistics.WebUI.Shared' (are you missing an assembly reference?)
- The type String cannot be constructed. You must configure the container to supply this value.
- The final local variable xxx cannot be assigned, since it is defined in an enclosing type