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
0 answers

Refactoring with EnvDTE CodeModel on .Net 5

I'm trying to make some refactorings in order to change namespace of some classes, create projects, etc.. using EnvDTE CodeModel. I have tried various methods I found on the web, but nothing seems to work. I'm using .Net 5. For example, in this page…
JorgeAM
  • 91
  • 2
  • 10
1
vote
1 answer

How to sign-in .NET 5 MVC webapp with KeyCloak using OpenIdConnect

I have configured my OpenIdConnect within KeyCloak and now I am trying to connect to it using .NET 5 MVC application. How to sign-in correctly? This is what I have so far When I try to access protected resource I get redirected to KeyCloak for a…
cpoDesign
  • 8,953
  • 13
  • 62
  • 106
1
vote
0 answers

Swagger Response Examples .Net 5 are not displayed

After updating my .net core 2.1 project to .net-5 and swagger swashbuckle from 2 to 5.6.3 the swagger response examples are not getting displayed anymore. Is there a new best practice way on how to solve this problem? On 2.1 i have added some…
sINFflwies
  • 69
  • 2
  • 6
1
vote
2 answers

Style to change images on buttons in dialog

I can't get the following to work, I must be missing something elementary. My objective is to have a style on a dialog (Window) to set an image on a button within it. So what I have is in the dialog code I added a DependencyProperty like so: public…
Daap
  • 345
  • 4
  • 10
1
vote
0 answers

Where is the OpenApi/Swagger version Specified in ASP.NET 5

I have configured swagger with a Blazor Wasm Hosted application and I am getting the following error: Unable to render this definition. The provided definition does not specify a valid version field. I have included a screenshot of the message as…
bbqchickenrobot
  • 3,592
  • 3
  • 45
  • 67
1
vote
0 answers

Using EF6 with .Net 5

is it possible to use different database platforms (SqLite, PostgreSQL, MariaDB) with .Net 5 and Entity Framework 6 similar to .Net Core? When I try to install the NuGet packages I get an error (is not compatible) Desperately trying to find a start…
user14914050
1
vote
2 answers

Placeholder for an InputSelect containing Enum values

I have an InputSelect that display various options based on an Enum type, as such @foreach (var type in @GetEnumValues()) { …
Francis Ducharme
  • 4,848
  • 6
  • 43
  • 81
1
vote
1 answer

Cache HTTP request name resolution for different URLs to same host. Possible?

The problem summary: I need to make call to HTTP resource A while using name resolution from previous HTTP request to resource B on the same host. CASE 1. Consecutive calls to same resource produce faster result after 1st call. Profiler tells me…
Boppity Bop
  • 9,613
  • 13
  • 72
  • 151
1
vote
1 answer

Howto debug .NET 5 WinForms application that references .NET Framework 4.8 class library in Visual Studio 2019

I have test .NET 5 WinForms application that references .NET Framework 4.8 class library - Github link. I suppose it's possible because of .NET Framework compatibility mode When I'm trying to debug a class library in Visual Studio 2019 16.8.4 (by…
bairog
  • 3,143
  • 6
  • 36
  • 54
1
vote
0 answers

Read an app setting in my .Net 5 application without using DI

I created an MVC application using .Net 5. Then I created a custom Attribute should read some settings from appsettings.json. Here a working solution: public class MyCustomAttribute : Attribute { public MyCustomAttribute(string key) :…
Simone
  • 2,304
  • 6
  • 30
  • 79
1
vote
2 answers

ASP.NET Core 5 MVC / C#: change model's value according to another model

I am new to ASP.NET Core 5 MVC apps. I added 3 models to my app. These are Trip, Vehicle and Driver. Vehicle has LastTripDateTime, TotalTravelDistanceInKilometers, AverageFuelConsumptionInLitres. The Driver has UsedVehicleCount. When a new record…
AlpUygur
  • 67
  • 6
1
vote
1 answer

blazor hosted template project not working after publishing the app

I create a new blazor hosted project, named foo, from the dotnet CLI: dotnet new blazorwasm --hosted I run the app with dotnet run -c Release The template app works correctly when requesting https://localhost:5001 (or 5000) I then publish the app…
Abdelhakim
  • 815
  • 1
  • 5
  • 19
1
vote
0 answers

Cannot set ValueObject as database index along with another table column

I have the following ValueMember public class ApplicationName : ValueObject { public string FirstName { get; } public string LastName { get; } protected ApplicationName() { } private ApplicationName(string firstName, string…
pantonis
  • 5,601
  • 12
  • 58
  • 115
1
vote
0 answers

How to read from IBM MQ with .NET5

We have a lot of business logic in .NET 4.0 which reads a message from an IBM MQ, does some processing, and writes to the database all in one transaction (coordinated by MSDTC). Is there some way to do this in .NET 5? As far as I know, .NET 5 does…
Alex
  • 419
  • 1
  • 5
  • 14
1
vote
1 answer

Showing popup on image click

I'm using this code to show images. The problem is that it is showing popup only for the first image and not the rest. Images are loaded from database so they all have the same id. Is that the problem or something else? Code : if…
user11247649
1 2 3
99
100