找不到类型或命名空间 IAppBuilder(缺少使用指令和程序集引用) [英] The type or namespace IAppBuilder could not be found(missing using a directive pr an assembly reference)
问题描述
我正在开发一个 Asp.Net MVC 4 应用程序,我在其中使用 SignalR 2.0.1 并使用 Owin Startup 类对其进行了映射,并且起初运行良好.
I am working on an Asp.Net MVC 4 Application in which I am using SignalR 2.0.1 and I Mapped it using Owin Startup class and it worked fine at first.
突然当我试图重建我的应用程序时,它说类型是命名空间 IAppbuilder
找不到.
All of a sudden when I tried to rebuild my app it said that the type are namespace IAppbuilder
could not be found.
以下是我的入门课
using Microsoft.Owin;
using Owin;
using WhiteBoardApp;
namespace WhiteBoardApp
{
public class Startup
{
public void Configuration(IAppBuilder app)
{
app.MapSignalR();
}
}
}
我也安装了 Owin
包,但由于某些原因我找不到 Owin Startup 类,所以我只添加了一个普通类并包含了所有需要的引用.请问我哪里出错了
I have installed Owin
package too, and for some reasons I could not find Owin Startup class so I just added a normal class and included all the references that are needed.
May I know where I am making a mistake
推荐答案
尝试使用 Package Manage Console 并执行
Try to use Package Manage Console and do
Update-Package Owin -Reinstall
这篇关于找不到类型或命名空间 IAppBuilder(缺少使用指令和程序集引用)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!