23 questions
9
votes
2
answers
234
views
Nullable warning when upgrading to extension-members syntax
I have two versions of helper methods for logging on ILogger. The first (classic extension methods) compiles fine; the second using extension members results in a compiler warning/error code.
CS8620: ...
5
votes
1
answer
202
views
.NET 9 -> .NET 10: MongoDB query using array.Contains throws NotSupportedException
After upgrading from .NET 9 to .NET 10, a MongoDB query that used to work now throws a System.NotSupportedException during query execution. I'm looking for pointers whether this is a runtime change in ...
2
votes
1
answer
271
views
Microsoft.AspNetCore.OpenApi 10.0.0 - The 'interceptors' feature is not enabled in this namespace
I am trying to upgrade to .NET 10 (from .NET 9), but after updating the Microsoft.AspNetCore.OpenApi package to 10.0.0, I can no longer build my application.
This is the error I get:
The '...
1
vote
1
answer
85
views
Serializing of polymorphic json in ASP.NET Core 10
I want to use polymorphic JSON for the RichText type in .NET 10 because I plan migrating from one richtext format to another and I am stuck with a problem: when the object is automatically serialized ...
1
vote
1
answer
80
views
How to use expression setters in ExecuteUpdate again in EF Core 10
Microsoft have changed ExecuteUpdateAsync to accept non-expression setters parameter in NET 10. Now it works this way:
await context.Blogs.ExecuteUpdateAsync(s =>
{
s.SetProperty(b => b....
1
vote
0
answers
72
views
Could not load type 'Microsoft.AspNetCore.Http.Metadata.IApiEndpointMetadata'
After upgrading from .NET 9 to .NET 10 (.NET vesion and packages like OpenApi), I started getting this exception:
Application startup exception
System.TypeLoadException: Could not load type '...
1
vote
1
answer
154
views
.NET migrations with vulnerabilities
I am attempting to create a new EF Core migration using the add-migration command in the Visual Studio Package Manager, but the command is failing with the following error:
The running command ...
0
votes
2
answers
75
views
Defining many-to-many with join table foreign key names without concrete c# domain table (shadow join)
I am trying to link a many-to-many relationship without any intermediary class in my domain.
The link is SoundProfiles <-> Switches. They're both not required. The error I get is
One or more ...
0
votes
0
answers
58
views
.NET is not recognized
In a .NET Core C# project, I get many errors like this:
Predefined type 'System.Object' is not defined or imported
Primary variables such as int and string are not recognized.
I have tried the ...
0
votes
0
answers
29
views
Conflicting assets with the same target path in ASP.NET Core 10 static web asset compression
The error occurs between two projects (PortalAdmin and Portal) that both contain the same static web asset. This appears to be related to the new static web asset compression feature in .NET 10.
What'...
0
votes
1
answer
99
views
Blazor with .NET 10 mode: @rendermode @(new InteractiveWebAssemblyRenderMode(prerender: false))
I am updating a Blazor web assembly project from .NET 9 to .NET 10, and noticed a change in behavior with the following line of code:
@rendermode @(new InteractiveWebAssemblyRenderMode(prerender: ...
-7
votes
0
answers
82
views
Blazor onClick fails after switching to .Net 10 [closed]
I have a .Net 9.0 Blazor project that I've migrated to .Net 10.0 .
After the migration, the @onclick events no longer trigger.
The .Net 9.0 version was setup to use InteractiveServer rendering both on ...