Questions tagged [.net-5]

The previous version of .NET, successor of both .NET Core and .NET Framework. Use this tag for questions about .NET 5 and .NET 5's formal specification.

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

What

is the next big release to the .NET family after .NET Core 3.0. There is now just one .NET going forward, which is usable across many platforms. These platforms currently include Windows, Linux, macOS, iOS, Android, tvOS, watchOS, and WebAssembly, with more to be announced.

When

was released November 10, 2020. The first preview was made available on March 16, 2020. It will be supported with future updates to Visual Studio 2019, Visual Studio for Mac, and Visual Studio Code.

Why

.NET 5 is the next step forward with .NET Core. The project aims to improve .NET in a few key ways:

  • Produce a single .NET runtime and framework that can be used everywhere and that has uniform runtime behaviors and developer experiences.
  • Expand the capabilities of .NET by taking the best of .NET Core, .NET Framework, Xamarin, and Mono.
  • Establish a single code-base that developers (Microsoft and the community) can work on and expand together and that improves all scenarios.
  • Version 4 was skipped because it would confuse users that are familiar with the .NET Framework, which has been using the 4.x series for a long time.
  • 'Core' was dropped to emphasize that this is the main implementation of .NET moving forward

This new project and direction are a game-changer for .NET. With .NET 5, your code and project files will look and feel the same no matter which type of app you’re building. You’ll have access to the same runtime, API, and language capabilities with each app. This includes new performance improvements that are being committed to CoreFX regularly.

Everything you love about .NET Core will continue to exist:

  • Open source and community-oriented on GitHub.
  • Cross-platform implementation.
  • Support for leveraging platform-specific capabilities, such as Windows Forms, WPF on Windows, and the native bindings to each native platform from Xamarin.
  • High performance.
  • Side-by-side installation.
  • Small project files (SDK-style).
  • Capable command-line interface (CLI).
  • Visual Studio, Visual Studio for Mac, and Visual Studio Code integration.

Here’s what is new:

  • Developers will have more choice of runtime experiences.
  • Java interoperability will be available on all platforms.
  • Objective-C and Swift interoperability will be supported on multiple operating systems.
  • CoreFX will be extended to support static compilation of .NET (ahead-of-time; AOT), smaller footprints, and support for more operating systems.
  • .NET 5 shipped in November 2020, with the intention to then ship a major version of .NET once a year, every November.
  • This is a non LTS version, hence not recommended for production. .dotnet community planned to release every LTS version as a even versions, .i.e., .net6, .net8...

Announcements

3059 questions
1
vote
1 answer

Combine multiple sites with my Blazor.Net 5 application

We are in the process of building a Blazor.Net5 server application alongside a number of existing web projects (Blazor, Angular, html etc). We would like the Blazor application to be the only application the users go to and access the other sites…
1
vote
0 answers

Column Order EF Core Net 5

I am working with entity framework and NET5, and I am trying to set the column order value in the definition, but when creating the migration and updating the database, the table does not reflect the order that I set. Here the code: public void…
1
vote
2 answers

.NET 5 AspNetCore catch-all route supersedes defined route

Migrating from .NET Core 3.1 to .NET 5, we encountered peculiar behavior with a catch-all route configuration. The relevant part of the startup configuration looks like this: public void ConfigureServices(IServiceCollection services) { …
JasonX
  • 503
  • 7
  • 21
1
vote
1 answer

Add reference to netNamedPipeBinding in .Net 5

i have class library project in .net framework 4.6.1. i have to migrate that project into .net 5. while doing so I am facing error for netNamedPipeBinding. Severity Code Description Project File Line Suppression State Error CS0246 The…
Khyati Desai
  • 41
  • 1
  • 6
1
vote
0 answers

Using Blazor Virtualize with Lazy Loading

I am doing a straight forward use of Virtualize but have some questions. I would like to lazy load via making paged calls to the API. However, we need to know the total count of available Countries. If I make a call on the OnIntialized to…
JoeyD
  • 693
  • 4
  • 25
1
vote
0 answers

EF Core 5: FreeText Failed to convert parameter value from a String to a Byte[] on a Full-Text indexed Byte[] column

I have the following entity with a property Content of type byte[]: public class Post { [Column(TypeName = "varbinary(max)")] [Required] public byte[] Content { get; set; } public string ContentType { get; set; } } and the content type…
Ali Kleit
  • 3,069
  • 2
  • 23
  • 39
1
vote
1 answer

Ant Design Blazor Show message Callback not working

I am trying to get a message to show up using the a card with actions from Ant Design Blazor; however, for some reason I am getting an error that says "Keyword this is not available in the current context". This is specifically due to the following…
TsTeaTime
  • 881
  • 1
  • 13
  • 34
1
vote
2 answers

Default config for .NET 5 code style analyzers

In .NET 5 there are two kinds of analyzers: code quality and code style. They are specified in .editorconfig. Specifying each rule by hand would take forever so it's useful to rely on Microsoft official "defaults". For code quality rules, there are…
lonix
  • 14,255
  • 23
  • 85
  • 176
1
vote
0 answers

.Net 5 environment variables priority order

To deploy my application it's necessary to change the variable ASPNETCORE_ENVIRONMENT to production but .net seems to read the variable from launchsettings.json instead of read the system variable. Is this behavior correct? What'd be the best to set…
1
vote
0 answers

HttpClient behavior different between .net core 3.1 and .net 5

The below code retrieves a JSON document from a WebHDFS instance using Kerberos authentication: HttpClientHandler clientHandler = new() { Credentials = CredentialCache.DefaultNetworkCredentials, DefaultProxyCredentials =…
vc 74
  • 37,131
  • 7
  • 73
  • 89
1
vote
3 answers

No option to create .NET 5.0 library in Visual Studio 2019

I can create .NET Framework and .NET Core but there is no option to create .NET library which is supposed to be the new .NET 5.0 I have seen the I can't create console application with .NET 5.0 as well (option missing) but I can create WPF…
zar
  • 11,361
  • 14
  • 96
  • 178
1
vote
1 answer

Playing MediaPlayer from standard lib

From my .NETStandard 2.1 lib, I don't have access to MediaPlayer class. A service from this same lib should play a mp3 file when an event occurs in one of its methods My main project is a .NET5 WPF and this little code is working great when testing…
YoyoS
  • 639
  • 1
  • 7
  • 19
1
vote
2 answers

Posting large file React.js & .net 5

I have a .net 5 API which has an endpoint that accepts a model consisting of an IFormFile File, string Description and string Name. When Posting a form using axios from my react client everything works just fine using a 55.500kb file however when…
Ryan
  • 233
  • 2
  • 9
1
vote
1 answer

Getting System.UnauthorizedAccessException when accessing Pictures directory, using .Net on MacOs

I'm experimenting with syncing photos between two cloud providers, first I wanted a local list of photos on my Mac. I'm using .Net 5 on MacOs However, Big Sur is preventing my app from accessing the Pictures directory, .Net is giving me a…
paul1923
  • 431
  • 3
  • 17
1
vote
1 answer

Why is Context.User.Identity suddenly null with .NET 5.0.102?

I was using authorization fine previously with .NET 5, but suddenly after .NET 5.0.102 Context.User.Identity was not populated at all in some methods. Nothing else changed, but some places where identity was supposed to be used just didn't get the…
Sami Kuhmonen
  • 30,146
  • 9
  • 61
  • 74
1 2 3
99
100