Questions tagged [.net-6.0]

For questions about Microsoft's .NET application development framework that are specific to version 6.0+ of the framework. Use only If your question are version-specific

For the original announcement of .NET 6, and for more detailed information, please refer to the official communication from Microsoft.


.NET 6 delivers the final parts of the .NET unification plan that started with .NET 5. .NET 6 unifies the SDK, base libraries, and runtime across mobile, desktop, IoT, and cloud apps.

is the next big release to the .NET family after .NET 5.

was released November 8th, 2021.

The first preview was made available on February 17th, 2021.

General Improvements :

In addition to this unification, the .NET 6 ecosystem offers:

  • LTS Release: .NET 6 is Supported for three years as the latest long term support (LTS) release.

  • Simplified development : Getting started is easy. New language features in C# 10 reduce the amount of code you need to write. And investments in the web stack and minimal APIs make it easy to quickly write smaller, faster microservices.

  • Better performance : .NET 6 is the fastest full stack web framework, which lowers compute costs if you're running in the cloud.

  • Ultimate productivity : .NET 6 and Visual Studio 2022 provide hot reload, new git tooling, intelligent code editing, robust diagnostics and testing tools, and better team collaboration.


Whats New :

  • C# 10 : All new C# 10 offers language improvements such as record structs, implicit using, and new lambda capabilities, while the compiler adds incremental source generators.

  • F# 6 : F# 6 adds new features including Task based async, pipeline debugging and numerous performance improvements.

  • Minimal APIs : Simplify getting started experience and HTTP services performance improvement.

  • Hot Reload : This feature enables you to skip rebuilding and restarting your app to view a new change — while your app is running — supported in Visual Studio 2022 and from the .NET CLI, for C# and Visual Basic.

  • .NET MAUI : .NET Multi-platform App UI (.NET MAUI) is still in preview, with a release candidate coming in the first quarter of 2022 and general availability (GA) in the second quarter of 2022. .NET MAUI makes it possible to build native client apps for desktop and mobile operating systems with a single codebase.

  • Blazor : ASP.NET Core in .NET 6 improves Blazor. Blazor components can now be rendered from JavaScript and integrated with existing JavaScript based apps.

  • File IO : File IO in .NET 6 has support for symbolic links and has greatly improved performance with a re-written-from-scratch FileStream.

  • Production stress-tested : Production stress-tested with Microsoft services, cloud apps run by other companies, and open source projects.

  • HTTP/3 : .NET 6 includes preview support for HTTP/3, a new version of HTTP. HTTP/3 solves some existing functional and performance challenges by using a new underlying connection protocol called QUIC. QUIC establishes connections more quickly, and connections are independent of the IP address, allowing mobile clients to roam between Wi-fi and cellular networks. For more information, see Use HTTP/3 with HttpClient.

Offical Links

5513 questions
1
vote
1 answer

State image shows obvious pixel defects when drawing WinForms TreeView

On my brand new Windows 11 desktop, the bitmap I've been using to indicate a 'connected database' state in my stable production app is suddenly looking terrible on my 4K 150% scaled display (the monitor is still the same as before). The issue seems…
IVSoftware
  • 5,732
  • 2
  • 12
  • 23
1
vote
2 answers

LINQ GroupBY Query returns different answers

I have a question about the LINQ GroupBy function. I noticed that although the same grouping function is used, the result is different depending on the model. I read a lot of datasets from a database to a variable which is called data. This list…
Lukas Hieronimus Adler
  • 1,063
  • 1
  • 17
  • 44
1
vote
1 answer

EF Core Include() gives null after query

I have a project that is running with .net core 6, EF Core 6.0.9, DB -> postgresql 14. I have these classes public class Language { [Key] public long Id { get; set; } public string PublicId { get; set; } …
Mr0fka
  • 11
  • 1
1
vote
1 answer

What is the best way to compare 2 records and find differences between each pair of properties?

I am using record from C# 9, for example public record Receipt { public string ClientName { get; init; } = ""; public string ClientPhoneNumber { get; init; } = ""; public List OtherInfo { get; init; } = new(); } and would…
Bruno
  • 4,685
  • 7
  • 54
  • 105
1
vote
1 answer

COM reg free and NET(5,6,7) version: is it possible?

Short description: we have c++ mfc application (client) that uses C# Net Framework 4.6 plugin (server). We also configured regfree between c++ and c# via manifests (at first step) and via embedded manifest (second step, without manifests files into…
Sergey Alikin
  • 159
  • 10
1
vote
3 answers

CancellationTokenSource for changing state after few seconds

I'm trying to recreate the effect one sees in Outlook / Gmail: a few seconds after opening an unread email, it is marked as read. But if one clicks a different email before that time elapses then the email remains unread. private…
lonix
  • 14,255
  • 23
  • 85
  • 176
1
vote
0 answers

How to build .Net MAUI app referencing a standard .Net 6 Class Library?

I have a standard C# class library that's used for a lot of different projects, and I'd like to use it as a project reference in .Net MAUI. I've put this class library in the same solution as .NET MAUI. When I run the GUI from the VS debugger the…
user4779
  • 645
  • 5
  • 14
1
vote
0 answers

How to include nugget dependencies for a .dll assembly reference

I have a project which I've built (call it "projectA") that generates a .dll "projectA.dll". I add this projectA.dll as an assembly reference to another project (call it "projectB"). All is working fine however projectA has some nugget packages that…
user4779
  • 645
  • 5
  • 14
1
vote
0 answers

Convert current executing assembly to MetadataReference or an array of bytes

I have a .NET 6.0 project which uses Royslin to compile a C# like language. That scripting language inherits and uses a few classes that my project has. Currently I use the following code to add a reference to the current assembly: var options =…
1
vote
1 answer

Autofac.Core.DependencyResolutionException: An exception was thrown while activating Blazor.Pages.Shared.CustomerGrid -> CustomerAppService

I implemented DDD using ABP framework, but I don't know which part is wrong. It's a simple project that follows the ABP tutorial. use : .net6 telerik blazor mssql Error: Autofac.Core.DependencyResolutionException: An exception was thrown while…
1
vote
1 answer

.Net Standard 2.0 project that references a .Net Core 6 project won't build

I created a .Net Standard 2.0 (I tried it as a 2.1 project also, with the same result) to be a bridge between a .Net 4.7.2 project and a .Net Core 6 project. The Standard project references the .Net Core 6 project. The problem is that the Standard…
Hoodlum
  • 1,443
  • 1
  • 13
  • 24
1
vote
0 answers

use of include between two one-to-one related entities

when performing a query of table B including the data from table A, the entity within the other is obtained several times [HttpGet("{id}")] public ActionResult GetById(int id) { using(var db=new ExampleContext()) { var data =…
1
vote
1 answer

How to reliably reference WindowsDesktop.App.Ref at build time

My build (in VS2022) has a C++/CLI assembly that needs to reliably reference types the WindowsDesktop.App.Ref package for .NET 6. Like types in the WindowsBase assembly. I cannot find a way to do this that works for all developers. I was trying to…
Joe
  • 5,394
  • 3
  • 23
  • 54
1
vote
1 answer

After migrating from .net core 3.1 to .net 6.0 MapVersionedODataRoutes method under Microsoft.AspNet.OData.Extensions not available

Currently I am using .netcore 3.1 project. Started migrating it to .net6.0 Below code is currently implemented in .netcore3.1 app.UseMvc(b => { b.MapVersionedODataRoutes("odata-versioned", "odata", edmModels); …
1
vote
2 answers

Microsoft.EntityFrameworkCore.SqlServer - Database not updating on context.Database.Migrate();

I'm trying to move a project from using Dapper to Microsoft.EntityFrameworkCore.SqlServer. I've created the entities and their respective mappings(configurations). Also I'm running in my ConfigureServices method inside startup. using var scope =…