【喜提.net 5】.NET 5.0-preview.1 發佈啦

来源:https://www.cnblogs.com/fmp/archive/2020/03/17/net5-preview1.html
-Advertisement-
Play Games

At the end of last year, we shipped .NET Core 3.0 and 3.1. These versions added the desktop app models Windows Forms (WinForms) and WPF, ASP.NET Blazo ...


 

 

At the end of last year, we shipped .NET Core 3.0 and 3.1. These versions added the desktop app models Windows Forms (WinForms) and WPF, ASP.NET Blazor for building single page applications and gRPC for cross-platform, contract-based messaging. We also added templates for building services, rich generation of client code for talking to gRPC, REST API services, and a lot more. We’re excited to see that .NET Core 3 has become the fastest adopted version of .NET ever and we’ve gained another million more users in just the last year.

We also communicated with these releases that this would conclude the porting of the app models from .NET Framework. With .NET Core 3, we have ported all of the most used app models as well as introduced newer cross- platform frameworks to replace the ones we did not port.

As we look forward to the next major release, .NET 5, we will continue to unify .NET into a single platform by including our .NET mobile device app model (Xamarin) in .NET 5. .NET 5 will include ASP.NET Core, Entity Framework Core, WinForms, WPF, Xamarin and ML.NET. For the first time, the entire platform will use a unified BCL (Base Class Libraries) for all the app models. Having a version 5 that is higher than both .NET Core and .NET Framework also makes it clear that .NET 5 is the future of .NET, which is a single unified platform for building any type of application.

We have said this many times, but we will reiterate again; .NET Core and then .NET 5 is the .NET you should build all your NEW applications with. .NET Framework will remain supported as long as Windows itself is supported. We will continue to provide security and bug fixes and keep the networking and crypto API’s up to date. It will remain safe and supported to keep your older applications on .NET Framework.

Install .NET 5.0 Preview 1

Today we are releasing the first preview of .NET 5, which is scheduled to GA (General Availability) later this year in November.

See ASP.NET Core updates in .NET 5 Preview 1 to learn about today’s ASP.NET Core release.

Preview 1 includes support for Windows ARM64 for the first time. Today’s release includes the .NET Core runtime. We expect Preview 2 to include the SDK (ASP.NET Core but not WPF or Windows Forms). A later preview will include WPF and Windows Forms. Support for Windows ARM64 will also be back-ported to .NET Core 3.1. We will share more information on that with the Preview 2 post.

Updating existing projects

You can update existing projects by updating your target framework, as follows:

<TargetFramework>netcoreapp5.0</TargetFramework>

High-level goals for .NET 5

Let me highlight some of the high-level goals for .NET 5:

  • Unified .NET SDK experience:
    • Single BCL (Base Class Library) across all .NET 5 applications. Today Xamarin applications use the Mono BCL but will move to use the.NET Core BCL, improving compatibility across our application models.
    • Mobile development (Xamarin) is integrated into .NET 5. This means the .NET SDK will support mobile. For example, you can use “dotnet new XamarinForms” to create a mobile application.
  • Native Applications supporting multiple platforms: Single Device project that supports an application that can work across multiple devices for example Window Desktop, Microsoft Duo (Android), and iOS using the native controls supported on those platforms.
  • Web Applications supporting multiple platforms: Single Blazor project that supports an application that can work in browsers, on mobile devices and as a native desktop application (Windows 10x for example)
  • Cloud Native Applications: High performance, single file (.exe) <50MB microservices and support for building multiple project (API, web front ends, containers) both locally and in the cloud.
  • Continuous Improvements, such as: faster algorithms in the BCL, better support for containers in the runtime, support for HTTP3.

Today’s first preview does not contain all the work to support these high-level goals yet, but we will continue to announce more capabilities and features in future previews.

Improvements in Preview 1

The following improvements are in Preview 1:

Regular expression performance improvements

We’ve invested in significant improvements to the Regex engine. On many of the expressions we’ve tried, these improvements routinely result in throughput improvements of 3-6x, and in some cases, much more. We have a blog post coming shortly that will describe these improvements in much more detail.

Code quality improvements in RyuJIT

Every release includes a set of performance improvements to the code that the JIT generates. We refer to these type of improvements as “CQ” or code quality. In most cases, these improvements also apply to the code generated for ready-to-run images.

The following improvements are in preview 1:

Assembly load diagnostics added to event pipe

We have added assembly load information to event pipe. This improvement is the start of making similar diagnostics functionality available as is part of .NET Framework with the Fusion Log Viewer. You can now use dotnet-trace to collect this information, using the following command:

 

dotnet-trace collect --providers Microsoft-Windows-DotNETRuntime:4:4 --process-id [process ID]

 

The workflow is described in Trace Assembly Loading with Event Pipe. You can see assembly loading information for a simple test app.

Image trace assemblies loads

Event pipe profiler APIs

Event pipe is a new subsystem and API that we added in .NET Core 2.2 to make it possible to perform performance and other diagnostic investigations on any operating system. In .NET 5.0, the event pipe has been extended to enable profilers to write event pipe events. This scenario is critical for instrumenting profilers that previously relied on ETW to monitor application behavior and performance.

GitHub repo consolidation

As part of the .NET 5 release, we reduced the number of GitHub repos we use to build and package .NET. Repo boundaries have a significant impact on many aspects of a project, including builds and issue management. With .NET Core 1.0, we had over 100 repos across ASP.NET, EF and .NET Core. With this latest release, we can now count the primary repos on one hand. We also moved nearly all repos to the dotnet org.

Check out the new, consolidated, repos:

Closing

We hope that you are excited about the work that is happening with .NET 5! The best way to prepare for .NET 5 is to move all of our .NET Core applications to 3.1- we will make the transition from .NET Core 3.1 to .NET 5 as painless as possible. And if you are still building applications on .NET Framework, please feel safe leaving those applications on .NET Framework but think of using .NET Core 3.1 for all your new applications. There are lots of exciting things coming to .NET!


您的分享是我們最大的動力!

-Advertisement-
Play Games
更多相關文章
  • 登錄頁: 首頁 模塊管理 角色管理,角色分配 用戶管理 ...
  • 對於 .NET 開發者來說,nuget 是必不可少的程式包管理工具。相應地,大部分開發團隊都需要在內部搭建 Nuget 伺服器,以管理私有 nupkg 包。本文所使用的 Nuget 伺服器,不是微軟官方的,而是 Baget。 ...
  • 一、初識Expression 源碼 1、在上一篇我們講到了委托(忘記了可以在看看,點贊在看養成習慣),今天要講的Expression也和委托有一點點關係吧(沒有直接關係,只是想要大家看看我其他的文章),Expression是.NET準備為Linq to Sql準備的,它的命名空間是System.Li ...
  • ChangeToken這個東西好像已經不止看到它一次兩次了,在Microsoft.Extensions.FileProviders包裡面也有發現它的身影。迷惑了很久之後,今天總算可以找個機會來扒一扒它,看看它到底是一個什麼東西。其實,從MSDN裡面的第一句描述以及這個類的命名,咱們還是可以讀懂它的大... ...
  • Polly每次重試執行不同的操作 前言 最近在寫WG(用的 .net core 3.1 + wpf + abp vnext),程式里大量用到了重試機制選用的是Polly組件(只知道這個...)。 遇到的問題 在當前屏幕下根據NPC名稱查找NPC的坐標,但自己的人物可能會擋住NPC,導致識別不到 需求 ...
  • using System; using System.Collections.Generic; using System.Linq; using System.Threading; using System.Threading.Tasks; using System.Windows.Forms; n ...
  • 項目是ASP.NET MVC,在重構時頁面時,幾部頁面相同的html代碼,被抽至部分視圖Partial View中去了。但是ASP.NET MVC中,又使用了angularjs。所以部分視圖中的Controller相對於angularjs來說,就成了子控制器Controller。 現在的問題是,在視 ...
  • .NET 5 Preview 1 發佈 去年年底,我們發佈了.NET Core 3.0和3.1.這些版本添加了桌面應用程式模型Windows Forms(WinForms)和WPF,ASP.NET Blazor用於構建SPA應用程式和用於構建分散式應用和服務的gRPC模板、用於與gRPC對話豐富的客 ...
一周排行
    -Advertisement-
    Play Games
  • 移動開發(一):使用.NET MAUI開發第一個安卓APP 對於工作多年的C#程式員來說,近來想嘗試開發一款安卓APP,考慮了很久最終選擇使用.NET MAUI這個微軟官方的框架來嘗試體驗開發安卓APP,畢竟是使用Visual Studio開發工具,使用起來也比較的順手,結合微軟官方的教程進行了安卓 ...
  • 前言 QuestPDF 是一個開源 .NET 庫,用於生成 PDF 文檔。使用了C# Fluent API方式可簡化開發、減少錯誤並提高工作效率。利用它可以輕鬆生成 PDF 報告、發票、導出文件等。 項目介紹 QuestPDF 是一個革命性的開源 .NET 庫,它徹底改變了我們生成 PDF 文檔的方 ...
  • 項目地址 項目後端地址: https://github.com/ZyPLJ/ZYTteeHole 項目前端頁面地址: ZyPLJ/TreeHoleVue (github.com) https://github.com/ZyPLJ/TreeHoleVue 目前項目測試訪問地址: http://tree ...
  • 話不多說,直接開乾 一.下載 1.官方鏈接下載: https://www.microsoft.com/zh-cn/sql-server/sql-server-downloads 2.在下載目錄中找到下麵這個小的安裝包 SQL2022-SSEI-Dev.exe,運行開始下載SQL server; 二. ...
  • 前言 隨著物聯網(IoT)技術的迅猛發展,MQTT(消息隊列遙測傳輸)協議憑藉其輕量級和高效性,已成為眾多物聯網應用的首選通信標準。 MQTTnet 作為一個高性能的 .NET 開源庫,為 .NET 平臺上的 MQTT 客戶端與伺服器開發提供了強大的支持。 本文將全面介紹 MQTTnet 的核心功能 ...
  • Serilog支持多種接收器用於日誌存儲,增強器用於添加屬性,LogContext管理動態屬性,支持多種輸出格式包括純文本、JSON及ExpressionTemplate。還提供了自定義格式化選項,適用於不同需求。 ...
  • 目錄簡介獲取 HTML 文檔解析 HTML 文檔測試參考文章 簡介 動態內容網站使用 JavaScript 腳本動態檢索和渲染數據,爬取信息時需要模擬瀏覽器行為,否則獲取到的源碼基本是空的。 本文使用的爬取步驟如下: 使用 Selenium 獲取渲染後的 HTML 文檔 使用 HtmlAgility ...
  • 1.前言 什麼是熱更新 游戲或者軟體更新時,無需重新下載客戶端進行安裝,而是在應用程式啟動的情況下,在內部進行資源或者代碼更新 Unity目前常用熱更新解決方案 HybridCLR,Xlua,ILRuntime等 Unity目前常用資源管理解決方案 AssetBundles,Addressable, ...
  • 本文章主要是在C# ASP.NET Core Web API框架實現向手機發送驗證碼簡訊功能。這裡我選擇是一個互億無線簡訊驗證碼平臺,其實像阿裡雲,騰訊雲上面也可以。 首先我們先去 互億無線 https://www.ihuyi.com/api/sms.html 去註冊一個賬號 註冊完成賬號後,它會送 ...
  • 通過以下方式可以高效,並保證數據同步的可靠性 1.API設計 使用RESTful設計,確保API端點明確,並使用適當的HTTP方法(如POST用於創建,PUT用於更新)。 設計清晰的請求和響應模型,以確保客戶端能夠理解預期格式。 2.數據驗證 在伺服器端進行嚴格的數據驗證,確保接收到的數據符合預期格 ...