Equivalent of JObject in System.Text.Json

As of Nov 2021, .NET 6 introduces the System.Text.Json.Nodes namespace which: Provides types for handling an in-memory writeable document object model (DOM) for random access of the JSON elements within a structured view of the data The four new types are JsonArray, JsonObject, JsonNode and JsonValue. The closest type to JObject is JsonObject which offers … Read more

error CS8773: “Feature ‘global using directive’ is not available in C# 9.0” after downgrade from net6.0 to net5.0

Finally I found that the reason is an extra property ImplicitUsings in the project file that is not supported by .net 5.0. <PropertyGroup> <TargetFramework>net5.0</TargetFramework> <ImplicitUsings>enable</ImplicitUsings> <Nullable>enable</Nullable> </PropertyGroup> I needed to remove ImplicitUsings from the file.

Equivalent to UserSettings / ApplicationSettings in WPF for newer .NET versions

You can add the same old good settings file e.g. via the right click on the Properties -> Add -> New Item and search for the “Settings”. The file can be edited in the settings designer and used as in the .net framework projects before (ConfigurationManager, Settings.Default.Upgrade(), Settings.Default.Save, etc. works). Add also the app.config file … Read more

Ref folder within .NET 5.0 bin folder

These are so called Reference Assemblies (assemblies that only contain the public interface of an assembly), these help speed up the build process, since projects that depend on this one will be able to see that there is no reason to recompile, even if the innards of the assembly have changed, because outwardly it’s still … Read more

Equivalent to UserSettings / ApplicationSettings in WPF .NET 5, .NET 6 or .Net Core

You can add the same old good settings file e.g. via the right click on the Properties -> Add -> New Item and search for the “Settings”. The file can be edited in the settings designer and used as in the .net framework projects before (ConfigurationManager, Settings.Default.Upgrade(), Settings.Default.Save, etc. works). Add also the app.config file … Read more

tech