-
Notifications
You must be signed in to change notification settings - Fork 10.3k
NativeAOT with reflection disabled working in .NET 7, not in .NET 8 for new KestrelServer #50255
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
Comments
My first idea about this is that this commit: 0c42c03 has introduced SimpleHttpsConfigurationService also in case of no https, which causes the above. If it would be possible to make this dependent on http/https then the issue could be resolved. |
Just tested with .NET 8 preview 3: reflection disabled works; .NET 8 preview 4: reflection disabled does not work |
Does |
I opened #50272 against release/8.0 to remove the implementation of |
@halter73 This can be closed now right? I think it didn't get auto-associated with the PR because the PR isn't against main. |
I can fully support the closing of this issue. Never seen such a quick resolution at this level and stage. Thanks. |
Is there an existing issue for this?
Describe the bug
2 years ago I spent quite some time (and David Fowler even corrected my code in https://github.com/LLT21/NativeAOT5) to make a tiny kestrel that worked with Native AOT and reflection disabled for reasons described in closed issue #31561.
I upgraded the tiny kestrel code today to make it in sync with the one I use in the TechEmpower benchmarks under framework https://github.com/LLT21/FrameworkBenchmarks/tree/master/frameworks/CSharp/appmpower:
using var kestrelServer = new KestrelServer(Options.Create(kestrelServerOptions), socketTransportFactory, NullLoggerFactory.Instance);
-> some reflection code has been added here in .NET 8.The output is:
Could you please have a look into this as it is crucial for us to keep this tiny bit working.
@davidfowl : do you have an idea for the cause of this ?
Expected Behavior
Would be nice to keep the behavior backward compatible
Steps To Reproduce
Compile https://github.com/LLT21/NativeAOT5 with .NET 7 and with .NET 8: with the former it is working, with the latter not.
Exceptions (if any)
No response
.NET Version
8.0.100-preview.7.23376.3
Anything else?
No response
The text was updated successfully, but these errors were encountered: