Closed drauch closed 1 year ago
Is there something wrong with this issue?
It does now exist 4 times:
In all four instances, it shows:
This issue is being transferred. Timeline may not be complete until it finishes.
What is going on here? :-)
Best regards, D.R.
@drauch The transfer hit a bug in GitHub, which resulted in duplicates, which were manually closed. https://github.com/dotnet/razor/issues/7286 is the open issue tracking this, which has all of the history and comments correctly transferred. You can ignore the closed issues :)
Is there an existing issue for this?
Describe the bug
When switching to .NET 6 ReSharper suggested that some of my null checks in Razor files are not necessary because my Model is never null. That's not true though, which is why I changed the model declaration to a nullable one, e.g.:
However, when I compile my solution with warnings as errors and use Razor runtime compilation I get the following errors when executing this Razor page:
I tried to circumvent this problem with the following idea:
However, it still doesn't work.
Any ideas on what I am doing wrong? I've found https://github.com/dotnet/aspnetcore/issues/37510 but it says everthing is fixed with 6.0.102 and I'm using an up-to-date VS 2022 with an SDK version of 6.0.201 (64bit).
Expected Behavior
Nullable models in Razor pages work without warnings.
Steps To Reproduce
No response
Exceptions (if any)
No response
.NET Version
6.0.201
Anything else?
Up-to-date ASP.NET Core 6.x Up-to-date VS 2022 Professional