What is New in .Net 5
What is new in Asp.Net 5
Edit this Article
- In the Program.cs, there is no Main Function, NameSpaces, just top-level code that is it. Just use Host.CreateBuilder() if you are following .Net Core way of implementing Startup.cs class in Program.cs Class File.
- Publish: You can now publish as a single file
- You don't need to install .Net on the Server to run an exe file.
- When Trying and Catching the Errors, you can now just throw unlike throw variable
just: throw that is it. No variable needed
- Analyzer: You can now get a deep level analyzer of your code by including the code below in the csproj file.
Warning Level: You can include an .editorConfig file inside your project at the root of your project and define the configuration for warnings or errors.
- Create a folder at the root of your project and add the .editorConfig file in the folder. Define your configuration in that file such as Warning Levels e.t.c.
- In the configuration file, you can now add a copy righted infor to C# files, the info travels with the file. See example below:
e.g. file_header_template = YourCopy righted Info Here.
- User String.asSpan[1..3] in C# 9
new in asp.net 5
upgrade from asp.net core 3.1 to .Net 5
Was this page helpful?