.NET Core 3.0 Preview 6 已發布,其中包括用於編譯程序集的更新,以改進啟動性能,以及通過對鏈接器和 EventPipe 的改進來優化應用程序的大小。
此外,.NET Core 團隊還為 Alpine on ARM64 發布了新的 Docker 鏡像。
下載地址:https://dotnet.microsoft.com/download/dotnet-core/3.0(支持 Windows, macOS 和 Linux)
WPF 團隊現已將大部分的 WPF 代碼庫託管至 GitHub。實際上,他們剛剛發布了 15 個組件的源代碼。對於熟悉 WPF 的開發者來說,這些程序集名稱應該非常熟悉。
Docker 鏡像現在可用於 ARM64 上的 .NET Core 和 ASP.NET Core,它們之前只適用於 x64 平台。
以下的鏡像可用於Dockerfile
, 如下所示使用docker pull
的方式即可:
docker pull mcr.microsoft.com/dotnet/core/runtime:3.0-alpine-arm64v8
docker pull mcr.microsoft.com/dotnet/core/aspnet:3.0-alpine-arm64v8
HTTP/2 是 HTTP 協議的主要修訂版。.NET Core 3.0 的HttpClient
中現已添加對 HTTP/2 請求的支持。雖然默認值仍為 HTTP/1.1,但我們可以通過在 HTTP 請求消息上設置版本來選擇使用 HTTP/2。
var client = new HttpClient() { BaseAddress = new Uri("https://localhost:5001") };
// HTTP/1.1 request
using (var response = await client.GetAsync("/"))
{
Console.WriteLine(response.Content);
}
// HTTP/2 request
using (var request = new HttpRequestMessage(HttpMethod.Get, "/") { Version = new Version(2, 0) })
using (var response = await client.SendAsync(request))
{
Console.WriteLine(response.Content);
}
或者可以通過設置DefaultRequestVersion
屬性以在HttpClient
中默認發送 HTTP/2 請求。
var client = new HttpClient()
{
BaseAddress = new Uri("https://localhost:5001"),
DefaultRequestVersion = new Version(2, 0)
};
// Defaults to HTTP/2
using (var response = await client.GetAsync("/"))
{
Console.WriteLine(response.Content);
}
其他更新還包括對事件管道的改進、使用 ReadyToRun 鏡像優化 .NET Core 應用程序以及針對跨平台/跨架構編譯的改進。詳情請查看發布公告。
[admin
]