PDA

View Full Version : [CLOSED] [#1873] .net 6



plok77
Feb 07, 2022, 10:20 AM
Official support for .NET 5 is due to end on May 8th 2022, in 3 months time

https://dotnet.microsoft.com/en-us/platform/support/policy/dotnet-core

When can we expect a new release of Ext.NET v7 that targets .NET 6?

fabricio.murta
Feb 07, 2022, 10:20 PM
Hello, Paul!

You should probably be ok to still use Ext.NET 7.2.0 in .NET 6 although it is linked against .NET 5. But we can't say for sure yet. We'll do some tests and get back to you. I know ordinary NuGet packages to console apps should work (.NET 6 with .NET 5 packages), but ASP.NET may be different.

We'll keep you posted.

plok77
Feb 08, 2022, 11:52 AM
Fabricio

I created a new .NET 6 Ext.NET application through the following steps:


Create a new Ext.NET 7.2 project by executing the command dotnet new extnet from the command line
In the project file, change the target framework to net6.0
In the project file, upgrade the version number of Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation to 6.0.1


When I run the application, the home page fails to load. The following error is shown in the Debug log:


System.NullReferenceException: Object reference not set to an instance of an object.
at Ext.Net.Core.Direct.ExtDirectProxyContent.GetDirec tMethodInfos()
at Ext.Net.Core.Direct.ExtDirectProxyContent.HasConte nt()
at Ext.Net.TagHelpers.Core.ExtScriptableContent.Write To(TextWriter writer, HtmlEncoder encoder)
at A.A.WriteTo(TextWriter writer, HtmlEncoder encoder)
at Microsoft.AspNetCore.Mvc.ViewFeatures.Buffers.View Buffer.WriteToAsync(TextWriter writer, HtmlEncoder encoder)
at Microsoft.AspNetCore.Mvc.Razor.RazorView.RenderLay outAsync(ViewContext context, ViewBufferTextWriter bodyWriter)
at Microsoft.AspNetCore.Mvc.Razor.RazorView.RenderLay outAsync(ViewContext context, ViewBufferTextWriter bodyWriter)
at Microsoft.AspNetCore.Mvc.Razor.RazorView.RenderAsy nc(ViewContext context)
at Microsoft.AspNetCore.Mvc.ViewFeatures.ViewExecutor .ExecuteAsync(ViewContext viewContext, String contentType, Nullable`1 statusCode)
at Microsoft.AspNetCore.Mvc.ViewFeatures.ViewExecutor .ExecuteAsync(ViewContext viewContext, String contentType, Nullable`1 statusCode)
at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceIn voker.<InvokeNextResultFilterAsync>g__Awaited|30_0[TFilter,TFilterAsync](ResourceInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)
at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceIn voker.Rethrow(ResultExecutedContextSealed context)
at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceIn voker.ResultNext[TFilter,TFilterAsync](State& next, Scope& scope, Object& state, Boolean& isCompleted)
at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceIn voker.InvokeResultFilters()
--- End of stack trace from previous location ---
at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceIn voker.<InvokeNextResourceFilter>g__Awaited|25_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)
at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceIn voker.Rethrow(ResourceExecutedContextSealed context)
at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceIn voker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)
at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceIn voker.InvokeFilterPipelineAsync()
--- End of stack trace from previous location ---
at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceIn voker.<InvokeAsync>g__Awaited|17_0(ResourceInvoker invoker, Task task, IDisposable scope)
at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceIn voker.<InvokeAsync>g__Awaited|17_0(ResourceInvoker invoker, Task task, IDisposable scope)
at Microsoft.AspNetCore.Routing.EndpointMiddleware.<Invoke>g__AwaitRequestTask|6_0(Endpoint endpoint, Task requestTask, ILogger logger)
at Microsoft.AspNetCore.Authorization.AuthorizationMi ddleware.Invoke(HttpContext context)
at Microsoft.AspNetCore.Localization.RequestLocalizat ionMiddleware.Invoke(HttpContext context)
at Microsoft.AspNetCore.ResponseCompression.ResponseC ompressionMiddleware.InvokeCore(HttpContext context)
at Westwind.AspNetCore.LiveReload.LiveReloadMiddlewar e.HandleHtmlInjection(HttpContext context) in C:\projects\Westwind.AspnetCore.LiveReload\Westwin d.AspnetCore.LiveReload\LiveReloadMiddleware.cs:li ne 101
at Westwind.AspNetCore.LiveReload.LiveReloadMiddlewar e.InvokeAsync(HttpContext context) in C:\projects\Westwind.AspnetCore.LiveReload\Westwin d.AspnetCore.LiveReload\LiveReloadMiddleware.cs:li ne 64
at Microsoft.AspNetCore.Diagnostics.DeveloperExceptio nPageMiddleware.Invoke(HttpContext context)
Microsoft.AspNetCore.Diagnostics.DeveloperExceptio nPageMiddleware: Warning: The response has already started, the error page middleware will not be executed.
Microsoft.AspNetCore.Server.IIS.Core.IISHttpServer : Error: Connection ID "17654110540902957078", Request ID "80000017-0000-f500-b63f-84710c7967bb": An unhandled exception was thrown by the application.

I tried removing the Live Reload Middleware by commenting out the relevant lines in Startup.cs. However this doesn't make a different to the overall result. Ext.Net.Core.Direct.ExtDirectProxyContent.GetDirec tMethodInfos() still ends up throwing a NullReferenceException.

Based on this, I assume there is some fundamental incompatibility between Ext.NET 7.2 and .NET 6.

Regards

Paul

fabricio.murta
Feb 08, 2022, 11:42 PM
Hello Paul!

It seems you did the homework just right. We were able to reproduce the same result even trying to switch to the new hosting model (simplified Startup.cs and Program.cs code) with no luck. The exception being triggered is probably a new behavior that was not foreseen by Ext.NET 7 and now triggers an exception. It really looks like a deeper review of the code will be necessary before Ext.NET 7 can run in ASP.NET 6 projects, unfortunately.

We have logged issue #1873 (https://github.com/extnet/Ext.NET/issues/1873) to implement compatibility with ASP.NET 6 and will post a follow-up here as soon as this gets implemented.

For now, unfortunately, we couldn't find proper way to enable Ext.NET 7 to work with this framework version.

Hope this helps!

dnakorea
Mar 08, 2022, 3:43 AM
Any update?

plok77
Mar 16, 2022, 2:20 PM
Fabricio

Please can you provide me with an update on when you expect to release a new version of Ext.NET that targets .NET 6?

Microsoft have said that official support for .NET 5 will end on May 8th 2022. That's only about 7 weeks from now, which doesn't provide much time for us to plan our upgrade.

.NET 6 was released on November 8th 2021, so I'm surprised that you only became aware of Ext.NET v7's incompatibility when I logged this issue. I would have expected the Ext.NET development to be actively working towards ensuring their product works with upcoming versions of .NET Core.

We have two Ext.NET 7 sites in production at the moment. It's of vital importance to us that these sites are still running on a supported version of .NET Core come May 8th.

Regards

Paul

fabricio.murta
Apr 01, 2022, 5:08 AM
Hello Paul!

We have just published Ext.NET 7.3.0-preview featuring ASP.NET Core 6 (thus .NET 6) support. We'll leave the preview running for some time before we push the final release, in case there are any pressing compatibility issue still.

Looking forward to yours, and anyone else's feedback on the pre-release stability on running projects.

dnakorea
Apr 03, 2022, 5:40 AM
I will wait for keep going.
Thanks!

plok77
Apr 06, 2022, 9:57 AM
Fabricio

So far, I haven't encountered any problems updating our projects to target .NET 6 and Ext.Net v7.3. So, it's positive feedback from me.

Regards

Paul

fabricio.murta
Apr 07, 2022, 7:57 AM
Thanks for the feedback!

Version 7.3.0 is now fully released, let us know if you find any problem with ASP.NET 6 support!