トピックス
Visual Studio 2022 version 17.1 Preview 3
Visual Studio 2022 version 17.1 Preview 3 がリリースされた。
Azure Container Apps 向けの GitHub Actions ワークフローファイルの生成などパブリッシュに関する機能の改善が行われているほか、試験的な機能としてインデックスを使用した高速なファイル内検索機能が実装されているとのこと。
Did someone say faster code search performance? #VisualStudio 2022 Preview 3 now supports indexed Find in Files searching! See how much faster Find in Files searching is for you in Preview 3 today!! pic.twitter.com/BxTolDjwN1
— Denizhan Yigitbas (@__denizhan__) January 20, 2022
Announcing .NET MAUI Preview 12
https://devblogs.microsoft.com/dotnet/announcing-net-maui-preview-12/
.NET MAUI Preview 12 がリリースされた。
このリリースでは下記の改善が行われている。
- アプリケーションライフサイクルなどの新しいドキュメント
- Android での FlyoutView ハンドラーの実装
- RelativeLayout/AbsoluteLayout の互換ハンドラーの実装
- Z インデックスの追加
- iOS の .NET 6 での型統合対応
- Windows でのタイトルバーへの拡張、
また、Flyout メニューとタブを使用するアプリケーションを簡単に実装するための Shell (AppShell) と呼ばれる仕組みが追加された。Shell は URI ベースのナビゲーションを提供し、アプリケーション内では Shell.Current.GoToAsync($"{nameof(ShowDetailPage)}?Id={Show.Id}") のような形でページ遷移できる。コンストラクターインジェクションによる DI もサポートしているとのこと。
Release Release v2.42.0 · grpc/grpc-dotnet
https://github.com/grpc/grpc-dotnet/releases/tag/v2.42.0
gRPC (.NET) の 2.42.0 がリリースされた。
クライアントサイドロードバランシングに関するいくつかの改善と不具合修正が行われている。
新たに ASP.NET Core でのヘルスチェックをサポートするための Grpc.AspNetCore.HealthChecks パッケージがリリースとなり NuGet にパブリッシュされるようになった。
Facebook SDK v12.2 for Xamarin.iOS Now Available
https://devblogs.microsoft.com/xamarin/facebook-sdk-v12-2-for-xamarin-ios-now-available/
Facebook SDK v12.2 for Xamarin.iOS がリリースされた。
このリリースでは iOS 向けの Facebook SDK v12.2 に対応したバインディングを提供するようになった。
アーティクル、スライドなど
OpenTelemetry .NETを理解する (2) ASP.NET CoreにOpenTelemetryをまずいれてみる - 銀の光と碧い空
https://tech.tanaka733.net/entry/2022/01/opentelemetry-dotnet-02
ASP.NET Core に OpenTelemetry のパッケージを追加し、メトリクスを New Relic に送信するという記事。
CallerArgumentExpressionによる引数の式表現の文字列化 - Qiita
https://qiita.com/skitoy4321/items/35e2506bedc11bf7a3f8
引数の呼び出し式を取得できる CallerArgumentExpression 属性の使用方法とその挙動についての記事。
The new handlers infrastructure in .NET MAUI
https://thewissen.io/new-handlers-infrastructure-in-net-maui/
Xamarin.Forms のカスタムレンダラーに相当する MAUI のハンドラーについての記事。Xamarin.Forms と MAUI での実装の違いなどを解説している。
Saving source generator output in source control: Creating a source generator - Part 6
Source Generator で生成するソースコードの出力をコントロールし、保存するといったことを行う方法についての記事。生成されたファイルをプロジェクトに追加した場合の問題の回避やターゲットフレームワーク別のファイルなどについても触れている。
EF Core 6 Features - Part 1
https://blog.okyrylchuk.dev/entity-framework-core-6-features-part-1
Entity Framework Core 6 の新しい機能についてのまとめ記事。
ASP.NET Core Configuration: adding all configs at one line of code
Microsoft.Extensions.Configuration の IConfigurationBuider にJSON ファイルの設定を複数まとめて追加するために拡張メソッドを用意することで簡潔に登録する手法についての記事。
ライブラリ、リポジトリ、ツールなど
ForNeVeR/Cesium: C compiler for the CLI platform
https://github.com/ForNeVeR/Cesium
IL を出力する C コンパイラー実装。
Not so long ago Cesium, a C17 compiler targeting .NET platform I develop, was able to compile a fully standard "Hello, world" program for the first time.
— Friedrich von Never (@fvnever) January 16, 2022
Today, I've prepared some contributor documentation and laid out the further plans. Go, check it out! https://t.co/boqBBfvZXD
Dotnetsafer - First .NET OBFUSCATOR with Military-Grade Protection (Try it FREE NOW!)
https://www.dotnetsafer.com/products/shield
.NET のアセンブリーを難読化する商用/有償 Obfuscator サービス。
Shield はビルド時のタスクでサービス側で難読化を行うことでクライアントコンピューターにインストール不要で常に新しい仕組みを使用できるとしている。
HangfireIO/Cronos: Fully-featured .NET library for working with Cron expressions. Built with time zones in mind and intuitively handles daylight saving time transitions
https://github.com/HangfireIO/Cronos
crontab のスケジュール指定書式をパースするためのライブラリー。
nuitsjp/Wpf.Extensions.Hosting
https://github.com/nuitsjp/Wpf.Extensions.Hosting
WPF アプリケーションを Generic Host で実行するためのライブラリー。WPF アプリケーションであっても ASP.NET Core と同じように Microsoft.Extensions.* の恩恵を受けることができる。
サイト、ドキュメントなど
Convert.ToHexString Method (System)
https://docs.microsoft.com/en-us/dotnet/api/system.convert.tohexstring?view=net-6.0
バイト配列を16進数文字列(大文字)に変換するメソッド。
string.Concat(hash.Select(x => x.ToString("X2"))) と同様の文字列が最小のコストで構築できる。
Deep Dive
Support basic end-to-end scenarios for converting string constants to UTF8 byte representation. by AlekseyTs · Pull Request #58849 · dotnet/roslyn
https://github.com/dotnet/roslyn/pull/58849
UTF-8 文字列を byte 配列 (ReadOnlySpan<byte>) に変換する基本実装の PR。
ref field support in .NET runtimes · Issue #63768 · dotnet/runtime
https://github.com/dotnet/runtime/issues/63768
ランタイムに ref フィールドのサポートを追加する PR。
WASM startup time optimization tracking issue · Issue #63809 · dotnet/runtime
https://github.com/dotnet/runtime/issues/63809
WebAssembly の起動速度の最適化に向けての親 Issue。
Introduce RandomAccess.SetLength by adamsitnik · Pull Request #63992 · dotnet/runtime
https://github.com/dotnet/runtime/pull/63992
RandomAccess.GetLength メソッドの逆に相当する、ハンドルに対して長さをセットするメソッドを追加する PR。短い場合は拡張し、長い場合は切り詰めるような処理となる。*nix 系では ftruncate。
Support u8 type suffix for UTF8 string literals. by AlekseyTs · Pull Request #58991 · dotnet/roslyn
https://github.com/dotnet/roslyn/pull/58991
UTF-8 文字列を表現する u8 サフィックスの実装の PR。