diff --git a/build/dependencies.props b/build/dependencies.props index 7f238cf9d5..28d901712a 100644 --- a/build/dependencies.props +++ b/build/dependencies.props @@ -4,44 +4,44 @@ 2.1.0-preview1-15670 - 2.1.0-preview1-28092 - 2.1.0-preview1-28092 - 2.1.0-preview1-28092 - 2.1.0-preview1-28092 - 2.1.0-preview1-28092 - 2.1.0-preview1-28092 - 2.1.0-preview1-28092 - 2.1.0-preview1-28092 - 2.1.0-preview1-28092 - 2.1.0-preview1-28092 - 2.1.0-preview1-28092 - 2.1.0-preview1-28092 - 2.1.0-preview1-28092 - 2.1.0-preview1-28092 - 2.1.0-preview1-28092 - 2.1.0-preview1-28092 - 2.1.0-preview1-28092 + 2.1.0-preview1-28112 + 2.1.0-preview1-28112 + 2.1.0-preview1-28112 + 2.1.0-preview1-28112 + 2.1.0-preview1-28112 + 2.1.0-preview1-28112 + 2.1.0-preview1-28112 + 2.1.0-preview1-28112 + 2.1.0-preview1-28112 + 2.1.0-preview1-28112 + 2.1.0-preview1-28112 + 2.1.0-preview1-28112 + 2.1.0-preview1-28112 + 2.1.0-preview1-28112 + 2.1.0-preview1-28112 + 2.1.0-preview1-28112 + 2.1.0-preview1-28112 15.3.409 15.3.409 - 2.1.0-preview1-28092 - 2.1.0-preview1-28092 - 2.1.0-preview1-28092 - 2.1.0-preview1-28092 - 2.1.0-preview1-28092 - 2.1.0-preview1-28092 - 2.1.0-preview1-28092 + 2.1.0-preview1-28112 + 2.1.0-preview1-28112 + 2.1.0-preview1-28112 + 2.1.0-preview1-28112 + 2.1.0-preview1-28112 + 2.1.0-preview1-28112 + 2.1.0-preview1-28112 2.0.0 - 2.1.0-preview1-26102-01 + 2.1.0-preview1-26115-03 15.3.0 - 2.1.0-preview1-28092 - 2.1.0-preview1-28092 - 2.1.0-preview1-28092 + 2.1.0-preview1-28112 + 2.1.0-preview1-28112 + 2.1.0-preview1-28112 2.0.0 0.19.0 3.7.0 16.16299.0 3.7.0 - 4.5.0-preview1-26102-01 + 4.5.0-preview1-26112-01 0.8.0 2.3.1 2.3.1 diff --git a/src/Microsoft.AspNetCore.SpaTemplates/content/Aurelia-CSharp/Startup.cs b/src/Microsoft.AspNetCore.SpaTemplates/content/Aurelia-CSharp/Startup.cs index fceee2f8f9..3d3ae4ec0c 100644 --- a/src/Microsoft.AspNetCore.SpaTemplates/content/Aurelia-CSharp/Startup.cs +++ b/src/Microsoft.AspNetCore.SpaTemplates/content/Aurelia-CSharp/Startup.cs @@ -5,6 +5,7 @@ using System.Threading.Tasks; using Microsoft.AspNetCore.Builder; using Microsoft.AspNetCore.Hosting; using Microsoft.AspNetCore.HttpsPolicy; +using Microsoft.AspNetCore.Mvc; using Microsoft.AspNetCore.SpaServices.Webpack; using Microsoft.Extensions.Configuration; using Microsoft.Extensions.DependencyInjection; @@ -23,7 +24,7 @@ namespace AureliaSpa // This method gets called by the runtime. Use this method to add services to the container. public void ConfigureServices(IServiceCollection services) { - services.AddMvc(); + services.AddMvc().SetCompatibilityVersion(CompatibilityVersion.Version_2_1); } // This method gets called by the runtime. Use this method to configure the HTTP request pipeline. diff --git a/src/Microsoft.AspNetCore.SpaTemplates/content/Knockout-CSharp/Startup.cs b/src/Microsoft.AspNetCore.SpaTemplates/content/Knockout-CSharp/Startup.cs index f6d51ad03e..13bfa380f6 100644 --- a/src/Microsoft.AspNetCore.SpaTemplates/content/Knockout-CSharp/Startup.cs +++ b/src/Microsoft.AspNetCore.SpaTemplates/content/Knockout-CSharp/Startup.cs @@ -5,6 +5,7 @@ using System.Threading.Tasks; using Microsoft.AspNetCore.Builder; using Microsoft.AspNetCore.Hosting; using Microsoft.AspNetCore.HttpsPolicy; +using Microsoft.AspNetCore.Mvc; using Microsoft.AspNetCore.SpaServices.Webpack; using Microsoft.Extensions.Configuration; using Microsoft.Extensions.DependencyInjection; @@ -23,7 +24,7 @@ namespace KnockoutSpa // This method gets called by the runtime. Use this method to add services to the container. public void ConfigureServices(IServiceCollection services) { - services.AddMvc(); + services.AddMvc().SetCompatibilityVersion(CompatibilityVersion.Version_2_1); } // This method gets called by the runtime. Use this method to configure the HTTP request pipeline. diff --git a/src/Microsoft.AspNetCore.SpaTemplates/content/Vue-CSharp/Startup.cs b/src/Microsoft.AspNetCore.SpaTemplates/content/Vue-CSharp/Startup.cs index 630bbfc38b..835a5dc701 100644 --- a/src/Microsoft.AspNetCore.SpaTemplates/content/Vue-CSharp/Startup.cs +++ b/src/Microsoft.AspNetCore.SpaTemplates/content/Vue-CSharp/Startup.cs @@ -5,6 +5,7 @@ using System.Threading.Tasks; using Microsoft.AspNetCore.Builder; using Microsoft.AspNetCore.Hosting; using Microsoft.AspNetCore.HttpsPolicy; +using Microsoft.AspNetCore.Mvc; using Microsoft.AspNetCore.SpaServices.Webpack; using Microsoft.Extensions.Configuration; using Microsoft.Extensions.DependencyInjection; @@ -23,7 +24,7 @@ namespace VueSpa // This method gets called by the runtime. Use this method to add services to the container. public void ConfigureServices(IServiceCollection services) { - services.AddMvc(); + services.AddMvc().SetCompatibilityVersion(CompatibilityVersion.Version_2_1); } // 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/RazorPagesWeb-CSharp/Startup.cs b/src/Microsoft.DotNet.Web.ProjectTemplates/content/RazorPagesWeb-CSharp/Startup.cs index f4b9e835bf..9f8e55d6ae 100644 --- a/src/Microsoft.DotNet.Web.ProjectTemplates/content/RazorPagesWeb-CSharp/Startup.cs +++ b/src/Microsoft.DotNet.Web.ProjectTemplates/content/RazorPagesWeb-CSharp/Startup.cs @@ -20,6 +20,7 @@ using Microsoft.AspNetCore.Http; #endif using Microsoft.AspNetCore.Hosting; using Microsoft.AspNetCore.HttpsPolicy; +using Microsoft.AspNetCore.Mvc; #if (OrganizationalAuth) using Microsoft.AspNetCore.Mvc.Authorization; #endif @@ -65,24 +66,24 @@ namespace Company.WebApplication1 #else options.UseSqlite( Configuration.GetConnectionString("DefaultConnection"), - sqlOptions => sqlOptions.MigrationsAssembly("Company.WebApplication1"))); + sqlOptions => sqlOptions.MigrationsAssembly("Company.WebApplication1") + )); #endif - services.AddIdentity(options => options.Stores.MaxLengthForKeys = 128) .AddEntityFrameworkStores() .AddDefaultUI() .AddDefaultTokenProviders(); -#elseif (OrganizationalAuth || IndividualB2CAuth) +#elif (OrganizationalAuth || IndividualB2CAuth) services.AddAuthentication(sharedOptions => { sharedOptions.DefaultScheme = CookieAuthenticationDefaults.AuthenticationScheme; sharedOptions.DefaultChallengeScheme = OpenIdConnectDefaults.AuthenticationScheme; }) #if (OrganizationalAuth) - .AddAzureAd(options => Configuration.Bind("AzureAd", options)) - #elseif (IndividualB2CAuth) - .AddAzureAdB2C(options => Configuration.Bind("AzureAdB2C", options)) + .AddAzureAd(options => Configuration.Bind("AzureAd", options)) + #elif (IndividualB2CAuth) + .AddAzureAdB2C(options => Configuration.Bind("AzureAdB2C", options)) #endif .AddCookie(); @@ -93,9 +94,10 @@ namespace Company.WebApplication1 { options.Conventions.AuthorizeFolder("/Account/Manage"); options.Conventions.AuthorizePage("/Account/Logout"); - }); + }) + .SetCompatibilityVersion(CompatibilityVersion.Version_2_1); -#elseif (OrganizationalAuth) +#elif (OrganizationalAuth) services.AddMvc(options => { var policy = new AuthorizationPolicyBuilder() @@ -106,9 +108,10 @@ namespace Company.WebApplication1 .AddRazorPagesOptions(options => { options.Conventions.AllowAnonymousToFolder("/Account"); - }); + }) + .SetCompatibilityVersion(CompatibilityVersion.Version_2_1); #else - services.AddMvc(); + services.AddMvc().SetCompatibilityVersion(CompatibilityVersion.Version_2_1); #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 7994827d11..bf2ef66e3c 100644 --- a/src/Microsoft.DotNet.Web.ProjectTemplates/content/StarterWeb-CSharp/Startup.cs +++ b/src/Microsoft.DotNet.Web.ProjectTemplates/content/StarterWeb-CSharp/Startup.cs @@ -14,6 +14,7 @@ using Microsoft.AspNetCore.Identity.EntityFrameworkCore; #endif using Microsoft.AspNetCore.Hosting; using Microsoft.AspNetCore.HttpsPolicy; +using Microsoft.AspNetCore.Mvc; #if (IndividualLocalAuth) using Microsoft.EntityFrameworkCore; #endif @@ -42,32 +43,33 @@ namespace Company.WebApplication1 { #if (IndividualLocalAuth) services.AddDbContext(options => - #if (UseLocalDB) + #if (UseLocalDB) options.UseSqlServer( Configuration.GetConnectionString("DefaultConnection"), sqlOptions => sqlOptions.MigrationsAssembly("Company.WebApplication1") )); - #else + #else options.UseSqlite( Configuration.GetConnectionString("DefaultConnection"), - sqlOptions => sqlOptions.MigrationsAssembly("Company.WebApplication1"))); - #endif - + sqlOptions => sqlOptions.MigrationsAssembly("Company.WebApplication1") + )); + #endif + services.AddIdentity(options => options.Stores.MaxLengthForKeys = 128) .AddEntityFrameworkStores() .AddDefaultUI() .AddDefaultTokenProviders(); -#elseif (OrganizationalAuth || IndividualB2CAuth) +#elif (OrganizationalAuth || IndividualB2CAuth) services.AddAuthentication(sharedOptions => { sharedOptions.DefaultScheme = CookieAuthenticationDefaults.AuthenticationScheme; sharedOptions.DefaultChallengeScheme = OpenIdConnectDefaults.AuthenticationScheme; }) #if (OrganizationalAuth) - .AddAzureAd(options => Configuration.Bind("AzureAd", options)) - #elseif (IndividualB2CAuth) - .AddAzureAdB2C(options => Configuration.Bind("AzureAdB2C", options)) + .AddAzureAd(options => Configuration.Bind("AzureAd", options)) + #elif (IndividualB2CAuth) + .AddAzureAdB2C(options => Configuration.Bind("AzureAdB2C", options)) #endif .AddCookie(); @@ -78,7 +80,7 @@ namespace Company.WebApplication1 options.CheckConsentNeeded = context => true; }); - services.AddMvc(); + services.AddMvc().SetCompatibilityVersion(CompatibilityVersion.Version_2_1); } // 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/StarterWeb-FSharp/Startup.fs b/src/Microsoft.DotNet.Web.ProjectTemplates/content/StarterWeb-FSharp/Startup.fs index 5c98f8c54d..870dedc04a 100644 --- a/src/Microsoft.DotNet.Web.ProjectTemplates/content/StarterWeb-FSharp/Startup.fs +++ b/src/Microsoft.DotNet.Web.ProjectTemplates/content/StarterWeb-FSharp/Startup.fs @@ -7,6 +7,7 @@ open System.Threading.Tasks open Microsoft.AspNetCore.Builder open Microsoft.AspNetCore.Hosting open Microsoft.AspNetCore.HttpsPolicy +open Microsoft.AspNetCore.Mvc open Microsoft.Extensions.Configuration open Microsoft.Extensions.DependencyInjection @@ -18,7 +19,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() |> ignore + services.AddMvc().SetCompatibilityVersion(CompatibilityVersion.Version_2_1) |> 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 6944cbf590..42991cd568 100644 --- a/src/Microsoft.DotNet.Web.ProjectTemplates/content/WebApi-CSharp/Startup.cs +++ b/src/Microsoft.DotNet.Web.ProjectTemplates/content/WebApi-CSharp/Startup.cs @@ -5,6 +5,7 @@ using System.Threading.Tasks; using Microsoft.AspNetCore.Builder; using Microsoft.AspNetCore.Hosting; using Microsoft.AspNetCore.HttpsPolicy; +using Microsoft.AspNetCore.Mvc; #if (OrganizationalAuth || IndividualB2CAuth) using Microsoft.AspNetCore.Authentication; using Microsoft.AspNetCore.Authentication.JwtBearer; @@ -35,12 +36,12 @@ namespace Company.WebApplication1 }) #if (IndividualB2CAuth) .AddAzureAdB2CBearer(options => Configuration.Bind("AzureAdB2C", options)); - #elseif (OrganizationalAuth) + #elif (OrganizationalAuth) .AddAzureAdBearer(options => Configuration.Bind("AzureAd", options)); #endif #endif - services.AddMvc(); + services.AddMvc().SetCompatibilityVersion(CompatibilityVersion.Version_2_1); } // 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 bc074908c1..1c56aa3a42 100644 --- a/src/Microsoft.DotNet.Web.ProjectTemplates/content/WebApi-FSharp/Startup.fs +++ b/src/Microsoft.DotNet.Web.ProjectTemplates/content/WebApi-FSharp/Startup.fs @@ -7,6 +7,7 @@ open System.Threading.Tasks open Microsoft.AspNetCore.Builder open Microsoft.AspNetCore.Hosting open Microsoft.AspNetCore.HttpsPolicy +open Microsoft.AspNetCore.Mvc open Microsoft.Extensions.Configuration open Microsoft.Extensions.DependencyInjection @@ -18,7 +19,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() |> ignore + services.AddMvc().SetCompatibilityVersion(CompatibilityVersion.Version_2_1) |> 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 33d79cd7e2..a54c883632 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 @@ -1,5 +1,6 @@ using Microsoft.AspNetCore.Builder; using Microsoft.AspNetCore.Hosting; +using Microsoft.AspNetCore.Mvc; using Microsoft.AspNetCore.SpaServices.AngularCli; using Microsoft.Extensions.Configuration; using Microsoft.Extensions.DependencyInjection; @@ -18,7 +19,7 @@ namespace AngularSpa // This method gets called by the runtime. Use this method to add services to the container. public void ConfigureServices(IServiceCollection services) { - services.AddMvc(); + services.AddMvc().SetCompatibilityVersion(CompatibilityVersion.Version_2_1); // 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 a3d692be07..3a21aa02cc 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 @@ -1,6 +1,7 @@ using Microsoft.AspNetCore.Builder; using Microsoft.AspNetCore.Hosting; using Microsoft.AspNetCore.HttpsPolicy; +using Microsoft.AspNetCore.Mvc; using Microsoft.AspNetCore.SpaServices.ReactDevelopmentServer; using Microsoft.Extensions.Configuration; using Microsoft.Extensions.DependencyInjection; @@ -19,7 +20,7 @@ namespace ReactSpa // This method gets called by the runtime. Use this method to add services to the container. public void ConfigureServices(IServiceCollection services) { - services.AddMvc(); + services.AddMvc().SetCompatibilityVersion(CompatibilityVersion.Version_2_1); // 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 683601aa2d..e7542bf982 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 @@ -1,6 +1,7 @@ using Microsoft.AspNetCore.Builder; using Microsoft.AspNetCore.Hosting; using Microsoft.AspNetCore.HttpsPolicy; +using Microsoft.AspNetCore.Mvc; using Microsoft.AspNetCore.SpaServices.ReactDevelopmentServer; using Microsoft.Extensions.Configuration; using Microsoft.Extensions.DependencyInjection; @@ -19,7 +20,7 @@ namespace ReactReduxSpa // This method gets called by the runtime. Use this method to add services to the container. public void ConfigureServices(IServiceCollection services) { - services.AddMvc(); + services.AddMvc().SetCompatibilityVersion(CompatibilityVersion.Version_2_1); // In production, the React files will be served from this directory services.AddSpaStaticFiles(configuration => diff --git a/test/Templates.Test/EmptyWebTemplateTest.cs b/test/Templates.Test/EmptyWebTemplateTest.cs index 33f63f5eca..08873b6362 100644 --- a/test/Templates.Test/EmptyWebTemplateTest.cs +++ b/test/Templates.Test/EmptyWebTemplateTest.cs @@ -14,7 +14,8 @@ namespace Templates.Test } [ConditionalFact] - [OSSkipCondition(OperatingSystems.Linux | OperatingSystems.MacOSX)] + [OSSkipCondition(OperatingSystems.Linux)] + [OSSkipCondition(OperatingSystems.MacOSX)] public void EmptyWebTemplate_Works_NetFramework() => EmptyWebTemplateImpl("net461"); diff --git a/test/Templates.Test/MvcTemplateTest.cs b/test/Templates.Test/MvcTemplateTest.cs index 8d6e35abba..b0f3388e30 100644 --- a/test/Templates.Test/MvcTemplateTest.cs +++ b/test/Templates.Test/MvcTemplateTest.cs @@ -14,7 +14,8 @@ namespace Templates.Test } [ConditionalTheory] - [OSSkipCondition(OperatingSystems.Linux | OperatingSystems.MacOSX)] + [OSSkipCondition(OperatingSystems.Linux)] + [OSSkipCondition(OperatingSystems.MacOSX)] [InlineData(null)] [InlineData("F#")] public void MvcTemplate_NoAuth_Works_NetFramework(string languageOverride) @@ -55,7 +56,8 @@ namespace Templates.Test } [ConditionalFact] - [OSSkipCondition(OperatingSystems.Linux | OperatingSystems.MacOSX)] + [OSSkipCondition(OperatingSystems.Linux)] + [OSSkipCondition(OperatingSystems.MacOSX)] public void MvcTemplate_IndividualAuth_Works_NetFramework() => MvcTemplate_IndividualAuthImpl("net461"); diff --git a/test/Templates.Test/RazorPagesTemplateTest.cs b/test/Templates.Test/RazorPagesTemplateTest.cs index ff95e173da..ef41913a3b 100644 --- a/test/Templates.Test/RazorPagesTemplateTest.cs +++ b/test/Templates.Test/RazorPagesTemplateTest.cs @@ -14,7 +14,8 @@ namespace Templates.Test } [ConditionalFact] - [OSSkipCondition(OperatingSystems.Linux | OperatingSystems.MacOSX)] + [OSSkipCondition(OperatingSystems.Linux)] + [OSSkipCondition(OperatingSystems.MacOSX)] public void RazorPagesTemplate_NoAuth_Works_NetFramework() => RazorPagesTemplate_NoAuthImpl("net461"); @@ -47,7 +48,8 @@ namespace Templates.Test } [ConditionalFact] - [OSSkipCondition(OperatingSystems.Linux | OperatingSystems.MacOSX)] + [OSSkipCondition(OperatingSystems.Linux)] + [OSSkipCondition(OperatingSystems.MacOSX)] public void RazorPagesTemplate_IndividualAuth_Works_NetFramework() => RazorPagesTemplate_IndividualAuthImpl("net461"); diff --git a/test/Templates.Test/SpaTemplateTest/AngularTemplateTest.cs b/test/Templates.Test/SpaTemplateTest/AngularTemplateTest.cs index ca0693f36b..f85f9dd823 100644 --- a/test/Templates.Test/SpaTemplateTest/AngularTemplateTest.cs +++ b/test/Templates.Test/SpaTemplateTest/AngularTemplateTest.cs @@ -11,7 +11,8 @@ namespace Templates.Test.SpaTemplateTest } [ConditionalFact] - [OSSkipCondition(OperatingSystems.Linux | OperatingSystems.MacOSX)] + [OSSkipCondition(OperatingSystems.Linux)] + [OSSkipCondition(OperatingSystems.MacOSX)] // Just use 'angular' as representative for .NET 4.6.1 coverage, as // the client-side code isn't affected by the .NET runtime choice public void AngularTemplate_Works_NetFramework() diff --git a/test/Templates.Test/WebApiTemplateTest.cs b/test/Templates.Test/WebApiTemplateTest.cs index 53d562037e..c7ca5be7bc 100644 --- a/test/Templates.Test/WebApiTemplateTest.cs +++ b/test/Templates.Test/WebApiTemplateTest.cs @@ -14,7 +14,8 @@ namespace Templates.Test } [ConditionalFact] - [OSSkipCondition(OperatingSystems.Linux | OperatingSystems.MacOSX)] + [OSSkipCondition(OperatingSystems.Linux)] + [OSSkipCondition(OperatingSystems.MacOSX)] public void WebApiTemplate_Works_NetFramework() => WebApiTemplateImpl("net461");