WebAPI无法编译appBuilder.UseWebApi方法不存在解决方案

UseWebApi方法是WebApiAppBuilderExtensions类定义的扩展方法,在System.Web.Http.Owin.dll 类库中定义。
打开VS解决方案:
在解决方案上点右键->管理NuGet程序包,添加Microsoft.AspNet.WebApi.Owin程序包。
必须是v5.2.7版本才有UseWebApi方法!!!

必须是v5.2.7版本才有UseWebApi方法!!!

C# Code:
[EditorBrowsable(EditorBrowsableState.Never)]
public static class WebApiAppBuilderExtensions
{
public static IAppBuilder UseWebApi(this IAppBuilder builder, HttpConfiguration configuration);
public static IAppBuilder UseWebApi(this IAppBuilder builder, HttpServer httpServer);
}
//来源:C/S框架网(www.csframework.com) QQ:1980854898
[EditorBrowsable(EditorBrowsableState.Never)]
public static class WebApiAppBuilderExtensions
{
public static IAppBuilder UseWebApi(this IAppBuilder builder, HttpConfiguration configuration);
public static IAppBuilder UseWebApi(this IAppBuilder builder, HttpServer httpServer);
}
//来源:C/S框架网(www.csframework.com) QQ:1980854898

扫一扫加微信


版权声明:本文为开发框架文库发布内容,转载请附上原文出处连接
NewDoc C/S框架网