トピックス
Release Release v2.56.0 · grpc/grpc-dotnet
https://github.com/grpc/grpc-dotnet/releases/tag/v2.56.0
grpc-dotnet v2.56.0 がリリースされた。
DebuggerDisplay 等によるデバッグ時の体験の向上や細かい改善や不具合修正が含まれている。
Windows Community Toolkit 8.0 Pre-release - #ifdef Windows
https://devblogs.microsoft.com/ifdef-windows/windows-community-toolkit-8-0-pre-release/
Windows Community Toolkit 8.0 のプレビュー版がリリースされた。
WCT 8.0 では複数のプラットフォームを一つのコードベースに統合し、名前空間の統一などが行われている。コンポーネントは UWP, Windows App SDK および Uno Platform で動作する。
記事では利用可能なパッケージや新規/既存プロジェクトでの利用方法についても紹介している。
Six Labors : Announcing ImageSharp.Drawing 1.0.0
https://sixlabors.com/posts/announcing-imagesharp-drawing-100/
SixLabors.ImageSharp.Drawing 1.0.0 がリリースされた。
このライブラリーはテキストレンダリングやパスや図形の描画といった高度な描画機能を ImageSharp を基盤として提供する。Linux のような環境での System.Drawing の代替手段として利用できる。
このライブラリーのリリース v1.x は Apache 2.0 License となるが依存先である ImageSharp は v2.x 系(オープンソースではない) ではないことに注意が必要となる。
The First Set of Bug-fixes For ReSharper and Rider 2023.2 Is Here! | The .NET Tools Blog
https://blog.jetbrains.com/dotnet/2023/08/24/2023-2-1-bugfix/
ReSharper および Rider 2023.2 がリリースされた。
このリリースではフリーズやコード解析の問題など様々な不具合が修正されている。
.NET Framework August 2023 Cumulative Update Preview - .NET Blog
https://devblogs.microsoft.com/dotnet/dotnet-framework-august-2023-cumulative-update-preview/
.NET Framework の2023年8月の累積アップデートのプレビューがリリースされた。
このリリースでは WPF、ランタイム、ASP.NET の不具合がいくつか修正されている。
アーティクル、スライドなど
A twisted tale of memory optimization
char[]
から UTF-8 バイト列を作る際のメモリー割り当てを最適化する際の落とし穴の話。
Microsoft.Fast.Components.FluentUIのDataGridで表示しきれない項目を折り返し表示できるようにする
https://zenn.dev/tomokusaba/articles/2468153bfe2d68
Blazor 向けの FluentUI の FluentDataGrid コンポーネントでのカラム内に長い文字列を指定した際に表示が切れてしまう問題を回避する方法について。
CEDEC 2023 モダンハイパフォーマンスC# 2023 Edition
https://speakerdeck.com/neuecc/cedec-2023-modanhaipahuomansuc-number-2023-edition
現代的な .NET でのハイパフォーマンスなコードを書く手法をシリアライザーの実装などを元に紹介しているスライド。
AntDesignBlazorを使用している場合のコンポーネントのテスト方法
https://zenn.dev/artuer/articles/9245d21ac8a88c
AntDesignBlazor を使用したコンポーネントに対するユニットテストを行う方法について。BUnit と AntDesignTestKit を使用してテストを記述できるようにする。
MAUI AppをiOSの実機&Simulatorで実行するスクリプトを作った話 - Qiita
https://qiita.com/t0r/items/1e7a2e8923a8b47a3a12
.NET MAUI アプリケーションを直接 iOS の実機とシミュレーターで実行するためのシェルスクリプトを作成したことについて。
Safely use secrets in HTTP requests in Visual Studio 2022 - Visual Studio Blog
Visual Studio 2022 の HTTP リクエストを送信する機能 (.http) を使用する際にシークレットを格納する方法について。
環境設定として httpenv.json やユーザー固有の設定の httpenv.json.user のほか、機密情報をを ASP.NET Core ユーザーシークレットや Azure Key Vault からの取得、Windows DPAPI で暗号化するといった方法を紹介している。そのほか HTTP ファイルでの追加サポートされる新しい構文についても紹介している。
Simplifying Header Propagation in Microservices with ForwardedHeadersMiddleware
クライアントから受信した HTTP ヘッダーをサービス間で伝搬させる方法について。記事では Microsoft.AspNetCore.HeaderPropagation NuGet パッケージを使用した方法を紹介している。
Simplified Code Refinement and Debugging with GitHub Copilot Chat - Visual Studio Blog
Visual Stduio での GitHub Copilot Chat を使用したデバッグとコード改善機能についての紹介。
記事ではプロファイラーでの CPU 使用率の分析、例外時のヘルパー、デバッグ中の変数やコールスタックを参照した質問といった機能を紹介している。
Exploring Blazor Changes in .NET 8 - Capture User Input with Forms
https://jonhilton.net/blazor-ssr-forms/
.NET 8 の Blazor (SSR) でのフォームのユーザー入力の取り扱いについての解説。
How to Install JetBrains Rider on Steam Deck | The .NET Tools Blog
https://blog.jetbrains.com/dotnet/2023/08/23/how-to-install-jetbrains-rider-on-steam-deck/
Steam Deck (SteamOS) 上に Rider をインストールする方法について。
記事では Rider のほか .NET や Unity をインストールして動かすところまで解説している。
Tales from the .NET Migration Trenches - Cataloging
https://www.jimmybogard.com/tales-from-the-net-migration-trenches-catalog/
.NET Framework から .NET への移行を行うために既存のアプリケーションで対応が必要なもののカタログを作成することについて。
ASP.NET Core Logging using Serilog and Azure
https://damienbod.com/2023/08/21/asp-net-core-logging-using-serilog-and-azure/
ASP.NET Core で Serilog を使用して Application Insights や Azure App Service のログサービスにログを送信する方法について。
Dynamically Adapting To Application Sizes
https://maoni0.medium.com/dynamically-adapting-to-application-sizes-2d72fcb6f1ea
.NET 8 で試験的に導入される Dynamic A daptation To Aapplication Sizes (DATA) と呼ばれる GC 機能についての解説。
C# Dev Kit for Visual Studio Code は GitHub Codespaces 上だと無料で使えてお得という話 - しばやん雑記
https://blog.shibayan.jp/entry/20230825/1692937805
Visual Studio Code 上で .NET 開発を行うための拡張 C# Dev Kit の利用には Visual Studio のライセンスが必要となるが GitHub Codespaces 上ではライセンスが含まれていることについて。
Azure Functions (.NET Isolated Worker) に追加された ASP.NET Core Integration を一通り試した - しばやん雑記
https://blog.shibayan.jp/entry/20230823/1692768859
Azure Functions の .NET isolated worker で利用できるようになった ASP.NET Core Integration について。
New in Visual Studio: Compare Files with Solution Explorer - Visual Studio Blog
Visual Studio のソリューションエクスプローラーからのファイル比較機能についての紹介。
Enum.TryParse unexpected behavior
https://steven-giesel.com/blogPost/64d479f1-823f-4fc7-a56a-2b1ff06dcf72
Enum.TryParse は実際に値が定義されていない場合でも基底の型に合えば通ってしまうことについて。IsDefined で確認するといった必要がある。
ライブラリ、リポジトリ、ツールなど
wcabus/nes-sharp: A NES emulator written in C#
https://github.com/wcabus/nes-sharp
C# で書かれた NES (ファミコン) エミュレーター。
In case anyone wants to have a go at it, here's the source code: https://t.co/caHmFh72vC
— Wesley Cabus (@WesleyCabus) August 25, 2023
サイト、ドキュメントなど
ツイート
.NET 8 でのメトリクス関連の設定をログなどと同様に appsettings.json で行えるようにするという話。
Part of improving our metrics story in .NET 8 means we're making it as first class as logging is. It'll be possible to configure meters and instruments via configuration. #dotnet #aspnetcore pic.twitter.com/jgA2yt4Rtj
— David Fowler (@davidfowl) August 26, 2023
オブジェクトヘッダーは4バイトだが 64-bit の .NET ではアラインメントの都合、4バイトのパディングが含まれてもったいないという話。
It bothers me so much that on #dotnet on 64-bit, 4 bytes are wasted for *every class instance* because objects are aligned on a 8 bytes boundary and the header has a fixed size of 4 bytes. pic.twitter.com/kToB6rnABG
— Kevin Gosse (@KooKiz) August 19, 2023
Deep Dive
Port NativeAOT exception handling to CoreCLR by janvorli · Pull Request #88034 · dotnet/runtime
https://github.com/dotnet/runtime/pull/88034
NativeAOT の例外ハンドリング機構を CoreCLR へ移植するという PR。
これにより例外処理が高速化されるが現時点ではいくつか制限があるため有効化するには環境変数を指定する必要がある。また、32-bit 版 Windows は複雑さのためサポートされないとのこと。
CoreCLR RISC-V architecture port · Issue #84834 · dotnet/runtime · GitHub
https://github.com/dotnet/runtime/issues/84834
RISC-V アーキテクチャーへのポーティングの Issue。