From 6bc3d4438972a0c71552d8dfd419139f898e2532 Mon Sep 17 00:00:00 2001 From: MagicAndre1981 Date: Fri, 6 Feb 2026 08:52:48 +0100 Subject: [PATCH 1/2] - added net8.0;net9.0;net10.0 as TargetFramework - updated "Microsoft.AspNetCore.Mvc" to version 2.3.9 - added System.Text.RegularExpressions in Version 4.3.1 to netstandard2.0, as transitive version 4.3.0 has at least one vulnerability with high severity - Sample: - added net8.0;net9.0;net10.0 as TargetFramework - replaced WebMarkupMin.AspNetCore2 with WebMarkupMin.AspNetCoreLatest - replaced services.AddMvc(); with services.AddMvc(options => options.EnableEndpointRouting = false); - removed "using Microsoft.AspNetCore.Http.Internal;" call as namespace is not found in modern .net versions - removed "app.UseBrowserLink();" as only working until ASP.NET Core 2.2 --- sample/Controllers/HomeController.cs | 11 +++++------ sample/Sample.csproj | 7 ++----- sample/Startup.cs | 8 +++----- src/WebEssentials.AspNetCore.OutputCaching.csproj | 5 +++-- 4 files changed, 13 insertions(+), 18 deletions(-) diff --git a/sample/Controllers/HomeController.cs b/sample/Controllers/HomeController.cs index e9c36b7..469b8a4 100644 --- a/sample/Controllers/HomeController.cs +++ b/sample/Controllers/HomeController.cs @@ -3,7 +3,6 @@ using System; using WebEssentials.AspNetCore.OutputCaching; using Microsoft.Net.Http.Headers; -using Microsoft.AspNetCore.Http.Internal; using System.Collections.Generic; using Microsoft.Extensions.Primitives; @@ -54,13 +53,13 @@ public IActionResult InvalidateQueryCache() { var queryString = new Dictionary(); queryString.Add("foo", new StringValues("1")); - var key = _outputCacheKeysProvider.GetRequestCacheKey(HttpContext, - new OutputCacheProfile() { - Duration = 600, - VaryByParam = "foo", + var key = _outputCacheKeysProvider.GetRequestCacheKey(HttpContext, + new OutputCacheProfile() { + Duration = 600, + VaryByParam = "foo", VaryByHeader = null, VaryByCustom = null - }, + }, System.Net.WebRequestMethods.Http.Get, Url.Action("Query", "Home"), new QueryCollection(queryString) diff --git a/sample/Sample.csproj b/sample/Sample.csproj index 5ff8cf9..641517a 100644 --- a/sample/Sample.csproj +++ b/sample/Sample.csproj @@ -1,14 +1,11 @@  - netcoreapp2.0 + net8.0;net9.0;net10.0 - - - 2.4.2 - + diff --git a/sample/Startup.cs b/sample/Startup.cs index fcfa10b..dba9d04 100644 --- a/sample/Startup.cs +++ b/sample/Startup.cs @@ -1,9 +1,8 @@ -using System.Collections.Generic; -using Microsoft.AspNetCore.Builder; +using Microsoft.AspNetCore.Builder; using Microsoft.AspNetCore.Hosting; using Microsoft.Extensions.DependencyInjection; using WebEssentials.AspNetCore.OutputCaching; -using WebMarkupMin.AspNetCore2; +using WebMarkupMin.AspNetCoreLatest; namespace Sample { @@ -13,7 +12,7 @@ public class Startup // For more information on how to configure your application, visit https://go.microsoft.com/fwlink/?LinkID=398940 public void ConfigureServices(IServiceCollection services) { - services.AddMvc(); + services.AddMvc(options => options.EnableEndpointRouting = false); services.AddOutputCaching(options => { options.Profiles["default"] = new OutputCacheProfile @@ -37,7 +36,6 @@ public void ConfigureServices(IServiceCollection services) // This method gets called by the runtime. Use this method to configure the HTTP request pipeline. public void Configure(IApplicationBuilder app, IHostingEnvironment env) { - app.UseBrowserLink(); app.UseDeveloperExceptionPage(); app.UseOutputCaching(); diff --git a/src/WebEssentials.AspNetCore.OutputCaching.csproj b/src/WebEssentials.AspNetCore.OutputCaching.csproj index cc5ce97..c8487b7 100644 --- a/src/WebEssentials.AspNetCore.OutputCaching.csproj +++ b/src/WebEssentials.AspNetCore.OutputCaching.csproj @@ -1,7 +1,7 @@  - netstandard2.0;netcoreapp3.1 + netstandard2.0;net8.0;net9.0;net10.0 True asp.net, performance, speed, cache, caching 1.0.0 @@ -22,7 +22,8 @@ - + + From d08a1e36e9e8de72ae3ee097f3c248f38bdebc8c Mon Sep 17 00:00:00 2001 From: MagicAndre1981 Date: Fri, 6 Feb 2026 09:24:50 +0100 Subject: [PATCH 2/2] install Microsoft .NET 10.0 SDK --- appveyor.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/appveyor.yml b/appveyor.yml index 26b94c3..14e8504 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -1,6 +1,9 @@ image: Visual Studio 2022 version: 1.0.{build} +install: + - choco install dotnet-10.0-sdk + build_script: - dotnet restore -v quiet - ps: dotnet build /p:configuration=Release /p:Version=$($env:appveyor_build_version)