![](/img/trans.png)
[英]The type or namespace name 'My_Interface_Name' could not be found (are you missing a using directive or an assembly reference?)
[英]Type or namespace name could not be found (missing using directive or assembly reference?)
使用此代碼:
using System.Web.Http;
class MyClass : IHttpActionResult
{ ... }
我得到錯誤:
找不到類型或名稱空間名稱“ IHttpActionResult”(您是否缺少using指令或程序集引用?)
如所示在這里 ,所述IHttpActionResult接口中定義System.Web.Http
。
怎么了?
修正了這個問題(嚴格把這一規定在項目>參考經理):
Microsoft.Owin 2.0.2.0
Owin 1.0.0.0
System.Net.Http.Formatting 5.2.3.0
System.Web 4.0.0.0
System.Web.Http 5.2.3.0
System.Web.Http.Owin 5.2.3.0
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.