MvcCoreMvcBuilderExtensions.SetCompatibilityVersion(IMvcBuilder, CompatibilityVersion) 方法

定义

CompatibilityVersion为应用程序的 ASP.NET CORE MVC 设置。

public static Microsoft.Extensions.DependencyInjection.IMvcBuilder SetCompatibilityVersion (this Microsoft.Extensions.DependencyInjection.IMvcBuilder builder, Microsoft.AspNetCore.Mvc.CompatibilityVersion version);
static member SetCompatibilityVersion : Microsoft.Extensions.DependencyInjection.IMvcBuilder * Microsoft.AspNetCore.Mvc.CompatibilityVersion -> Microsoft.Extensions.DependencyInjection.IMvcBuilder
<Extension()>
Public Function SetCompatibilityVersion (builder As IMvcBuilder, version As CompatibilityVersion) As IMvcBuilder

参数

version
CompatibilityVersion

CompatibilityVersion要配置的值。

返回

IMvcBuilder

IMvcBuilder

适用于