dotnet new api -aot: ‘-aot’ is not a valid option
The correct syntax for generating a project with AOT is --aot
(with 2 hyphens). In this particular case, the correct command would be:
dotnet new api --aot
Code language: Bash (bash)
The correct syntax for generating a project with AOT is --aot
(with 2 hyphens). In this particular case, the correct command would be:
dotnet new api --aot
Code language: Bash (bash)
Starting with .NET 8, the JsonSerializerOptions class features a new TypeInfoResolverChain property in addition to the existing TypeInfoResolver property. With this new property, you are no longer required to specify all the resolvers in the same place, instead, you can add them later as needed. Let’s look at an example: Besides adding new type resolvers…
WPF applications use by default software rendering when accessed over remote desktop, even if the system has hardware rendering capabilities. With .NET 8, a new option is introduced which allows you to opt into hardware acceleration when using the Remote Desktop Protocol. This can result in improved performance and an overall more responsive application. You…
Part of .NET 8, JsonNode and JsonArray get a few new additions to their API. We’ve already covered deep copy and deep equality in an earlier article, but there’s more. GetValueKind Returns the JsonValueKind of the current instance. GetPropertyName Returns property name of the current node from the parent object. Throws an InvalidOperationException if the…
.NET 9 brings significant improvements to LINQ’s ToArray method, both in terms of speed, as well as memory allocation. To achieve this, the new implementation makes use of new runtime features such as InlineArray and ArrayPool to significantly reduce memory allocations and improve speed, especially when dealing with an IEnumerable<T> of unknown length. If you’re curious about…
This article will guide you through building your first .NET Aspire application. If you want an overview of .NET Aspire and what it brings to the table, check out our What is .NET Aspire article. Prerequisites There are a few things you need to have ready before you get started with .NET Aspire: If you…
Files opened or saved using WPF’s file dialogs (OpenFileDialog, SaveFileDialog or OpenFolderDialog) are by default added to the Windows Explorer’s recent files list and can also impact the Recommended section of the Start Menu in Windows 11. To disable this behavior, you can set AddToRecent to false on your dialog before calling the ShowDialog() method….