简体   繁体   English

找不到类型或命名空间名称'ContractClassFor'(您是否缺少using指令或程序集引用?)

[英]The type or namespace name 'ContractClassFor' could not be found (are you missing a using directive or an assembly reference?)

I am using the following code. 我使用以下代码。

[ContractClassFor(typeof(IWindow))]

Why the error "The type or namespace name 'ContractClassFor' could not be found (are you missing a using directive or an assembly reference?)" is coming? 为什么错误“无法找到类型或命名空间名称'ContractClassFor'(您是否缺少using指令或程序集引用?)”即将推出?

It is happened because of an ambiguity issue. 这是因为模棱两可的问题。 I removed Microsoft.Contracts from reference. 我从引用中删除了Microsoft.Contracts。 Now its working fine. 现在它的工作正常。 Thanks Mr.Frebin Francis for your support. 谢谢弗雷宾弗朗西斯先生的支持。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 找不到类型或名称空间名称(缺少使用指令或程序集引用吗?) - Type or namespace name could not be found (missing using directive or assembly reference?) 找不到类型或名称空间名称“ FacebookSessionClient”(您是否缺少using指令或程序集引用?) - The type or namespace name 'FacebookSessionClient' could not be found (are you missing a using directive or an assembly reference?) 找不到类型或命名空间名称'SignInManager'(您是否缺少using指令或程序集引用?) - The type or namespace name 'SignInManager' could not be found (are you missing a using directive or an assembly reference?) 错误 CS0246:找不到类型或命名空间名称“IWebHostEnvironment”(您是否缺少 using 指令或程序集引用?) - error CS0246: The type or namespace name 'IWebHostEnvironment' could not be found (are you missing a using directive or an assembly reference?) 找不到类型或名称空间名称“ PrintDocument”(是否缺少using指令或程序集引用?) - The type or namespace name 'PrintDocument' could not be found (are you missing a using directive or an assembly reference?) 找不到类型或命名空间名称“OleDbConnection”(您是否缺少 using 指令或程序集引用?) - The type or namespace name 'OleDbConnection' could not be found (are you missing a using directive or an assembly reference?) 为什么会出现这个错误? “找不到类型或名称空间名称'c'(您是否缺少using指令或程序集引用?)” - Why this error ? “The type or namespace name 'c' could not be found (are you missing a using directive or an assembly reference?)” 错误1找不到类型或名称空间名称'FPSTimer'(您是否缺少using指令或程序集引用?) - Error 1 The type or namespace name 'FPSTimer' could not be found (are you missing a using directive or an assembly reference?) 找不到类型或名称空间名称“ HttpConfiguration”(是否缺少using指令或程序集引用? - The type or namespace name 'HttpConfiguration' could not be found (are you missing a using directive or an assembly reference? 找不到类型或名称空间名称“ form2”(您是否缺少using指令或程序集引用?) - The type or namespace name 'form2' could not be found (are you missing a using directive or an assembly reference?)
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM