madskristensen / Miniblog.Core

An ASP.NET Core blogging engine
https://miniblogcore.azurewebsites.net/
Other
1.48k stars 499 forks source link

I think it's the right time to upgrade to .NET 6 :) #169

Open ghost opened 2 years ago

ghost commented 2 years ago

Mads, please, do you have this in plan ?

dynamoRando commented 2 years ago

Just an FYI - I tried upgrading to .NET6 locally and ran into the following error on startup:

TypeLoadException: Could not load type 'Microsoft.AspNetCore.Http.Features.IHttpBufferingFeature' from assembly 'Microsoft.AspNetCore.Http.Features, Version=6.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60'.

WebMarkupMin.AspNetCore2.WebMarkupMinMiddleware.ProcessAsync(HttpContext context, bool useMinification, bool useCompression)
System.Runtime.CompilerServices.AsyncMethodBuilderCore.Start<TStateMachine>(ref TStateMachine stateMachine)
System.Runtime.CompilerServices.AsyncTaskMethodBuilder.Start<TStateMachine>(ref TStateMachine stateMachine)
WebMarkupMin.AspNetCore2.WebMarkupMinMiddleware.ProcessAsync(HttpContext context, bool useMinification, bool useCompression)
WebMarkupMin.AspNetCore2.WebMarkupMinMiddlewareBase.Invoke(HttpContext context)
WebEssentials.AspNetCore.OutputCaching.OutputCacheMiddleware.ServeFromMvcAndCacheAsync(HttpContext context)
WebEssentials.AspNetCore.OutputCaching.OutputCacheMiddleware.InvokeAsync(HttpContext context)
Microsoft.AspNetCore.Authentication.AuthenticationMiddleware.Invoke(HttpContext context)
WilderMinds.MetaWeblog.MetaWeblogMiddleware.Invoke(HttpContext context, MetaWeblogService service)
Microsoft.AspNetCore.Diagnostics.StatusCodePagesMiddleware.Invoke(HttpContext context)
Microsoft.AspNetCore.Diagnostics.DeveloperExceptionPageMiddleware.Invoke(HttpContext context)

To fix:

That should be it; as far as I can tell.

dynamoRando commented 2 years ago

Created PR #171 for this

ghost commented 2 years ago

Great, but it would also use the latest features that .NET 6 allows. Do you want to do that ? :)

xaberue commented 2 years ago

Seems that the project already has this upgrade developed and merged, can be closed that issue?