From 647f0f81c2e26b5988e18c9f863d0c9e95fbb800 Mon Sep 17 00:00:00 2001 From: Ryan Brandenburg Date: Tue, 22 May 2018 11:18:21 -0700 Subject: [PATCH] CompatibilityVersion -> 2.2 --- .../content/RazorPagesWeb-CSharp/Startup.cs | 10 +++++----- .../content/StarterWeb-CSharp/Startup.cs | 12 ++++++------ .../content/StarterWeb-FSharp/Startup.fs | 2 +- .../content/WebApi-CSharp/Startup.cs | 2 +- .../content/WebApi-FSharp/Startup.fs | 2 +- .../content/Angular-CSharp/Startup.cs | 2 +- .../content/React-CSharp/Startup.cs | 2 +- .../content/ReactRedux-CSharp/Startup.cs | 2 +- 8 files changed, 17 insertions(+), 17 deletions(-) diff --git a/src/Microsoft.DotNet.Web.ProjectTemplates/content/RazorPagesWeb-CSharp/Startup.cs b/src/Microsoft.DotNet.Web.ProjectTemplates/content/RazorPagesWeb-CSharp/Startup.cs index 6423b8010f..a9827bb88d 100644 --- a/src/Microsoft.DotNet.Web.ProjectTemplates/content/RazorPagesWeb-CSharp/Startup.cs +++ b/src/Microsoft.DotNet.Web.ProjectTemplates/content/RazorPagesWeb-CSharp/Startup.cs @@ -61,13 +61,13 @@ namespace Company.WebApplication1 #if (IndividualLocalAuth) services.AddDbContext(options => - #if (UseLocalDB) +#if (UseLocalDB) options.UseSqlServer( Configuration.GetConnectionString("DefaultConnection"))); - #else +#else options.UseSqlite( Configuration.GetConnectionString("DefaultConnection"))); - #endif +#endif services.AddDefaultIdentity() .AddEntityFrameworkStores(); @@ -124,9 +124,9 @@ namespace Company.WebApplication1 .Build(); options.Filters.Add(new AuthorizeFilter(policy)); }) - .SetCompatibilityVersion(CompatibilityVersion.Version_2_1); + .SetCompatibilityVersion(CompatibilityVersion.Version_2_2); #else - services.AddMvc().SetCompatibilityVersion(CompatibilityVersion.Version_2_1); + services.AddMvc().SetCompatibilityVersion(CompatibilityVersion.Version_2_2); #endif } diff --git a/src/Microsoft.DotNet.Web.ProjectTemplates/content/StarterWeb-CSharp/Startup.cs b/src/Microsoft.DotNet.Web.ProjectTemplates/content/StarterWeb-CSharp/Startup.cs index 4cdb0ff356..9bf4144391 100644 --- a/src/Microsoft.DotNet.Web.ProjectTemplates/content/StarterWeb-CSharp/Startup.cs +++ b/src/Microsoft.DotNet.Web.ProjectTemplates/content/StarterWeb-CSharp/Startup.cs @@ -61,13 +61,13 @@ namespace Company.WebApplication1 #if (IndividualLocalAuth) services.AddDbContext(options => - #if (UseLocalDB) +#if (UseLocalDB) options.UseSqlServer( Configuration.GetConnectionString("DefaultConnection"))); - #else +#else options.UseSqlite( Configuration.GetConnectionString("DefaultConnection"))); - #endif +#endif services.AddDefaultIdentity() .AddEntityFrameworkStores(); #elif (OrganizationalAuth) @@ -115,7 +115,7 @@ namespace Company.WebApplication1 .AddAzureADB2C(options => Configuration.Bind("AzureAdB2C", options)); #endif - #if (OrganizationalAuth) +#if (OrganizationalAuth) services.AddMvc(options => { var policy = new AuthorizationPolicyBuilder() @@ -123,9 +123,9 @@ namespace Company.WebApplication1 .Build(); options.Filters.Add(new AuthorizeFilter(policy)); }) - .SetCompatibilityVersion(CompatibilityVersion.Version_2_1); + .SetCompatibilityVersion(CompatibilityVersion.Version_2_2); #else - services.AddMvc().SetCompatibilityVersion(CompatibilityVersion.Version_2_1); + services.AddMvc().SetCompatibilityVersion(CompatibilityVersion.Version_2_2); #endif } diff --git a/src/Microsoft.DotNet.Web.ProjectTemplates/content/StarterWeb-FSharp/Startup.fs b/src/Microsoft.DotNet.Web.ProjectTemplates/content/StarterWeb-FSharp/Startup.fs index e54cde90e3..fa6d675c7e 100644 --- a/src/Microsoft.DotNet.Web.ProjectTemplates/content/StarterWeb-FSharp/Startup.fs +++ b/src/Microsoft.DotNet.Web.ProjectTemplates/content/StarterWeb-FSharp/Startup.fs @@ -21,7 +21,7 @@ type Startup private () = // This method gets called by the runtime. Use this method to add services to the container. member this.ConfigureServices(services: IServiceCollection) = // Add framework services. - services.AddMvc().SetCompatibilityVersion(CompatibilityVersion.Version_2_1) |> ignore + services.AddMvc().SetCompatibilityVersion(CompatibilityVersion.Version_2_2) |> ignore // This method gets called by the runtime. Use this method to configure the HTTP request pipeline. member this.Configure(app: IApplicationBuilder, env: IHostingEnvironment) = diff --git a/src/Microsoft.DotNet.Web.ProjectTemplates/content/WebApi-CSharp/Startup.cs b/src/Microsoft.DotNet.Web.ProjectTemplates/content/WebApi-CSharp/Startup.cs index 93e87090fd..2c44b43d63 100644 --- a/src/Microsoft.DotNet.Web.ProjectTemplates/content/WebApi-CSharp/Startup.cs +++ b/src/Microsoft.DotNet.Web.ProjectTemplates/content/WebApi-CSharp/Startup.cs @@ -43,7 +43,7 @@ namespace Company.WebApplication1 services.AddAuthentication(AzureADB2CDefaults.BearerAuthenticationScheme) .AddAzureADB2CBearer(options => Configuration.Bind("AzureAdB2C", options)); #endif - services.AddMvc().SetCompatibilityVersion(CompatibilityVersion.Version_2_1); + services.AddMvc().SetCompatibilityVersion(CompatibilityVersion.Version_2_2); } // This method gets called by the runtime. Use this method to configure the HTTP request pipeline. diff --git a/src/Microsoft.DotNet.Web.ProjectTemplates/content/WebApi-FSharp/Startup.fs b/src/Microsoft.DotNet.Web.ProjectTemplates/content/WebApi-FSharp/Startup.fs index cbc5f4e5b6..33d8beeef4 100644 --- a/src/Microsoft.DotNet.Web.ProjectTemplates/content/WebApi-FSharp/Startup.fs +++ b/src/Microsoft.DotNet.Web.ProjectTemplates/content/WebApi-FSharp/Startup.fs @@ -21,7 +21,7 @@ type Startup private () = // This method gets called by the runtime. Use this method to add services to the container. member this.ConfigureServices(services: IServiceCollection) = // Add framework services. - services.AddMvc().SetCompatibilityVersion(CompatibilityVersion.Version_2_1) |> ignore + services.AddMvc().SetCompatibilityVersion(CompatibilityVersion.Version_2_2) |> ignore // This method gets called by the runtime. Use this method to configure the HTTP request pipeline. member this.Configure(app: IApplicationBuilder, env: IHostingEnvironment) = diff --git a/src/Microsoft.DotNet.Web.Spa.ProjectTemplates/content/Angular-CSharp/Startup.cs b/src/Microsoft.DotNet.Web.Spa.ProjectTemplates/content/Angular-CSharp/Startup.cs index 4cad62f327..d76e75a557 100644 --- a/src/Microsoft.DotNet.Web.Spa.ProjectTemplates/content/Angular-CSharp/Startup.cs +++ b/src/Microsoft.DotNet.Web.Spa.ProjectTemplates/content/Angular-CSharp/Startup.cs @@ -22,7 +22,7 @@ namespace Company.WebApplication1 // This method gets called by the runtime. Use this method to add services to the container. public void ConfigureServices(IServiceCollection services) { - services.AddMvc().SetCompatibilityVersion(CompatibilityVersion.Version_2_1); + services.AddMvc().SetCompatibilityVersion(CompatibilityVersion.Version_2_2); // In production, the Angular files will be served from this directory services.AddSpaStaticFiles(configuration => diff --git a/src/Microsoft.DotNet.Web.Spa.ProjectTemplates/content/React-CSharp/Startup.cs b/src/Microsoft.DotNet.Web.Spa.ProjectTemplates/content/React-CSharp/Startup.cs index 52123f94bf..1bf655a29d 100644 --- a/src/Microsoft.DotNet.Web.Spa.ProjectTemplates/content/React-CSharp/Startup.cs +++ b/src/Microsoft.DotNet.Web.Spa.ProjectTemplates/content/React-CSharp/Startup.cs @@ -22,7 +22,7 @@ namespace Company.WebApplication1 // This method gets called by the runtime. Use this method to add services to the container. public void ConfigureServices(IServiceCollection services) { - services.AddMvc().SetCompatibilityVersion(CompatibilityVersion.Version_2_1); + services.AddMvc().SetCompatibilityVersion(CompatibilityVersion.Version_2_2); // In production, the React files will be served from this directory services.AddSpaStaticFiles(configuration => diff --git a/src/Microsoft.DotNet.Web.Spa.ProjectTemplates/content/ReactRedux-CSharp/Startup.cs b/src/Microsoft.DotNet.Web.Spa.ProjectTemplates/content/ReactRedux-CSharp/Startup.cs index 52123f94bf..1bf655a29d 100644 --- a/src/Microsoft.DotNet.Web.Spa.ProjectTemplates/content/ReactRedux-CSharp/Startup.cs +++ b/src/Microsoft.DotNet.Web.Spa.ProjectTemplates/content/ReactRedux-CSharp/Startup.cs @@ -22,7 +22,7 @@ namespace Company.WebApplication1 // This method gets called by the runtime. Use this method to add services to the container. public void ConfigureServices(IServiceCollection services) { - services.AddMvc().SetCompatibilityVersion(CompatibilityVersion.Version_2_1); + services.AddMvc().SetCompatibilityVersion(CompatibilityVersion.Version_2_2); // In production, the React files will be served from this directory services.AddSpaStaticFiles(configuration =>