2023-09-06 csharpdotnetdotnet-8 .NET 8 – Memory<byte> is serialized as base64 Starting with .NET 8, both Memory<byte> and ReadOnlyMemory<byte> are serialized as Base64 strings, while other types like Memory<int> remain JSON arrays.
2023-09-05 csharpdotnetdotnet-8 .NET 8 – Include non-public members in JSON serialization Learn how to include private, protected, and internal properties in JSON serialization in .NET 8 using the JsonInclude attribute.
2023-09-04 dotnetdotnet-8 dotnet workload clean Use the `dotnet workload clean` command to remove leftover .NET workload packs after an SDK or Visual Studio update — when to use it, what it removes, and gotchas.
2023-09-03 dotnetdotnet-8 .NET 8 – Deserialize into read-only properties Learn how to deserialize JSON into read-only properties without a setter in .NET 8 using JsonObjectCreationHandling or JsonSerializerOptions.
2023-09-02 dotnetdotnet-8 .NET 8 – Handle missing members during JSON deserialization Learn how to throw exceptions for unmapped JSON properties during deserialization in .NET 8 using JsonUnmappedMemberHandling.
2023-08-29 dotnet-scriptdotnet How to install dotnet script dotnet script enables you to run C# scripts (.CSX) from the .NET CLI. The only requirement is to have .NET 6 or newer installed on your machine. You can use the following command to install dotnet-script globally: Then to execute a script file you simply call dotnet script <file_path> like in the example below: How…
2023-08-11 csharpdotnet C# How to wait for a process to end? Wait for a child process in C# with WaitForExit or WaitForExitAsync. Run a complete example covering exit codes, timeouts, cancellation, and cleanup on .NET 8 and 10.
2023-08-06 dotnetdotnet-8 .NET 8 JsonNamingPolicy: SnakeCaseLower and KebabCaseLower (System.Text.Json) Use the new .NET 8 `JsonNamingPolicy.SnakeCaseLower` (and SnakeCaseUpper, KebabCaseLower, KebabCaseUpper) to serialize snake_case / kebab-case JSON via System.Text.Json — no custom converter needed.
2023-06-14 dotnet dotnet new api -aot: ‘-aot’ is not a valid option Fix the '-aot is not a valid option' error by using the correct double-hyphen syntax: dotnet new api --aot.
2023-06-11 csharpdotnet How to start programming with C# A beginner's guide to getting started with C# programming, from setting up Visual Studio to writing your first program and finding learning resources.