-
Notifications
You must be signed in to change notification settings - Fork 10.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
OrchardCore doesn't work on net6.0 #34208
Comments
I was able to repro this. Dropping some logged info here in case it's helpful later...
|
@davidfowl there are two things that I can think about being problematic here:
I was expecting to see an Not sure if |
Yea, but it used to work in .NET 5, this is a compat break in .NET 6. We need to figure out why it broke |
UseOrchardCore is doing it internally. Along with alot of other crazy things 😄 |
@davidfowl my money is on application parts not working well with top-level statements or some of the new minimal hosting APIs, that's what I would check first. Does it work outside of orchard? |
Top level statements? Yes. |
Thanks for contacting us. We're moving this issue to the |
OK this is a bit more insidious than I thought, and it might not be an MVC or routing issue (yet). There are no |
Found the issue. It's this change 2af293d. This works: using Microsoft.AspNetCore.Mvc.ApiExplorer;
using Microsoft.AspNetCore.Mvc.Infrastructure;
using Microsoft.Extensions.DependencyInjection.Extensions;
Host.CreateDefaultBuilder(args).ConfigureWebHostDefaults(webbuilder =>
{
webbuilder.Configure(app =>
{
app.UseOrchardCore();
});
})
.ConfigureServices(services =>
{
services.RemoveAll<IActionDescriptorCollectionProvider>();
services.RemoveAll<IApiDescriptionGroupCollectionProvider>();
services.AddOrchardCms();
})
.Build()
.Run(); It seems orchard relies on certain services not being added by the shell application. In this case the |
Verified and it has been fixed on SDK dotnet-sdk-6.0.100-preview.7.21363.2.Thanks. |
Describe the bug
When trying to use OrchardCore on a net6.0 app, the default page 404s.
To Reproduce
Exceptions (if any)
(Note: there is a background NullReferenceException occurring in DependencyInjection code. That is tracked by dotnet/runtime#55255. I've fixed it locally and ensured that this issue still occurs even when the NRE is fixed.)
Further technical details
dotnet --info
cc @davidfowl
The text was updated successfully, but these errors were encountered: