2023-03-19: .NET 8 Preview 2, Visual Studio 2022 v17.6 Preview 2, Semantic Kernel, MessagePack-CSharp v2.5.108

Published on Sunday, 19 March 2023

トピックス

Announcing .NET 8 Preview 2 - .NET Blog

https://devblogs.microsoft.com/dotnet/announcing-dotnet-8-preview-2/

.NET 8 Preview 2 がリリースされた。

このリリースでは System.ComponentModel.DataAnnotations を拡張する属性の追加やリフレクションでの関数ポインターのサポートが追加された。

EF Core 8 Preview 2: Lite and familiar - .NET Blog

https://devblogs.microsoft.com/dotnet/announcing-ef8-preview-2/

Entity Framework Core 8 Preview 2 がリリースされた。

記事ではこのリリースで利用できるようになった SQLite での JSON 列サポートと SQL Server/Azure SQL databases での HierarchyId サポートについて紹介している。

ASP.NET Core updates in .NET 8 Preview 2 - .NET Blog

https://devblogs.microsoft.com/dotnet/asp-net-core-updates-in-dotnet-8-preview-2/

.NET 8 Preview 8 での ASP.NET Core のアップデートについて。

  • Blazor の QuickGrid サポート
  • Blazor WebAssembly での JIT (Jiterpreter) によるパフォーマンス向上
  • [FromBody] が複数指定されていることを検出する Analyzer
  • より回復力のある統合のための ProblemDetails の新 API
  • ObjectPool での IResettable インターフェース
  • 名前付きパイプのパフォーマンスの向上

Visual Studio 2022 v17.6 Preview 2 is now available - Visual Studio Blog

https://devblogs.microsoft.com/visualstudio/visual-studio-2022-v17-6-preview-2-is-now-available/

Visual Studio 2022 version 17.6 Preview 2 がリリースされた。

  • 生産性のレベルアップ
    • ビルド中の Git ステージとコミット
    • マージダイアログの改善
    • ブレークポイントグループ
    • C++ のインストルメンテーションプロファイリング
    • WSL 上での .NET のプロファイラーライブグラフ
    • C++ メンバー関数の作成
  • ゲーム開発の合理化
    • Unreal Engine コード解析
    • Tim Jones による HLSL ツール拡張
  • .NET モバイル開発
    • Android Manifest エディター
  • エンタープライズ管理
    • Visual Studio のレイアウトのイントラネットからのホストとデプロイ
    • インストーラーでの利用可能なプロダクトの公開の制限

Hello, Semantic Kernel! | Semantic Kernel

https://devblogs.microsoft.com/semantic-kernel/hello-world/

Semantic Kernel が公開された。

Semantic Kernel は OpenAI や Azure OpenAI Service といった大規模言語モデル (LLM) の AI プロンプトをアプリケーションに組み込むための 軽量 SDK。現在 C# がサポートされ、Python がプレビューサポートとなっている。

Release v2.5.108 · neuecc/MessagePack-CSharp

https://github.com/neuecc/MessagePack-CSharp/releases/tag/v2.5.108

MessagePack-CSharp v2.5.108 がリリースされた。

v2.4.59 以降の変更点として nullable アノテーションの追加や .NET 5 のサポートの廃止、ジェネレーターのロールフォワード、その他さまざまな修正と改善が含まれている。

How Async/Await Really Works in C# - .NET Blog

https://devblogs.microsoft.com/dotnet/how-async-await-really-works/

C# の async/await がどのように動いているのかを解説している記事。

APM やイベントベースでの非同期パターンから Task ベースへの流れ、Task と ValueTask、C# におけるコンパイル時のコードの展開とその動作の詳しい解説といったことが書かれている。

Release Release v2.52.0 · grpc/grpc-dotnet

https://github.com/grpc/grpc-dotnet/releases/tag/v2.52.0

grpc-dotnet (Grpc.Net) v2.52 がリリースされた。

このリリースでは dotnet-grpc ツールが .NET 6 をターゲットとするようになったほか、様々な細かい不具合の修正と改善が含まれている。

Release v1.2.5 · microsoft/WindowsAppSDK

https://github.com/microsoft/WindowsAppSDK/releases/tag/v1.2.5

Windows App SDK 1.2.5 (1.2.230313.1) がリリースされた。

このリリースでは Composition のシャットダウン中のクラッシュの修正や画面がオフの場合でもアニメーションが継続する問題の修正、WebView2 でのマウスとタッチの入力の失敗の修正が含まれている。

.NET March 2023 Updates – .NET 7.0.4, .NET 6.0.15 - .NET Blog

https://devblogs.microsoft.com/dotnet/march-2023-updates/

.NET 7.0.4 と .NET 6.0.15 がリリースされた。

このリリースでは細かい不具合の修正と改善が複数含まれている。

Announcing Polyglot Notebooks! Multi-language notebooks in Visual Studio Code - .NET Blog

https://devblogs.microsoft.com/dotnet/announcing-polyglot-notebooks-harness-the-power-of-multilanguage-notebooks-in-visual-studio-code/

Polyglot Notebooks (旧 .NET Interactive Notebooks) が Visual Studio Code 向け拡張として Marketplace で一般公開された。

アーティクル、スライドなど

.NET 8 Preview 2で追加された入力値検証について

https://zenn.dev/tomokusaba/articles/bb5cb32470ca8a

.NET 8 Preview 2 で追加された System.ComponentModel.DataAnnotations の検証属性の機能を紹介している。

Blazor WebAssemblyにおける入力値検証について

https://zenn.dev/tomokusaba/articles/9fd92c1716ca30

Blazor WebAssembly での入力値検証の実装方法について。

#WeAreDotnet

https://medium.com/@tim.cadenbach/wearedotnet-d8ec96685c33

#WeAreDotnet というコミュニティーポータルについて。

Getting Started with EventStoreDb (C#)

https://medium.com/@no1.melman10/getting-started-with-eventstoredb-c-13411ec08713

EventStoreDB というイベントソーシング向けデータベースを使う方法の解説。

なお EventStoreDB 自体も .NET (C#) で実装されている。

Extending Visual Studio CodeLens Functionality - Part II

https://codingwithcalvin.net/extending-visual-studio-codelens-functionality-part-ii/

Visual Studio の CodeLens を拡張方法の解説シリーズ。この記事では CodeLens のコールバックを実装する方法について解説している。

忘れがちなカルチャー依存問題 | ++C++; // 未確認飛行 C ブログ

https://ufcpp.net/blog/2023/3/string-order/

Globalization Invariant Mode を有効にした場合に文字列比較における Invariant, Ordinal の扱いと Order などでのパフォーマンスについて。

XCopyでデプロイ可能なWinUI3のミニマムプロジェクトを作る

https://zenn.dev/nin_neko/articles/ecb16042f04c01

XCopy デプロイ (インストールせずファイルをコピーすれば動く形)のミニマムな WinUI 3 アプリケーションプロジェクトの作り方について。

CESU-8 から UTF-16 への変換 - Qiita

https://qiita.com/7shi/items/8eae6d909e1b82b35215

CESU-8 (UTF-8 の変種) を UTF-16 に変換する方法について。

Unity DOTS support in Rider 2023.1 | The .NET Tools Blog

https://blog.jetbrains.com/dotnet/2023/03/16/unity-dots-support-in-rider-2023-1/

Rider 2023.1 で追加された Unity の DOTS サポートの紹介。

DOTS 向けのテンプレートやコード生成などがサポートされている。

Help us investigate a new Welcome Experience in Visual Studio 17.6 Preview 2 - Visual Studio Blog

https://devblogs.microsoft.com/visualstudio/welcome-experience/

Visual Studio 17.6 Preview 2 で導入された新しい Welcome ページについて。

以前のスタートウィンドウ(既存のソリューションの選択や新しいプロジェクトの作成などを行うウィンドウ)に代わり導入された Welcome ページの紹介とそのフィードバックを求める案内。

C# - Search AD entry by ObjectSid using Novell Directory Ldap Nuget package

https://dev.to/hbolajraf/c-search-ad-entry-by-objectsid-using-novell-directory-ldap-nuget-package-28il

Novell.Directory.Ldap.NETStandard パッケージを使用して ObjectSid を元に Active Directory を検索する方法について。

[ASP.NET Core] Try Server-Sent Events

https://dev.to/masanori_msl/aspnet-core-try-server-sent-events-5db2

ASP.NET Core で Server-Sent Events を実現する方法について。

Building a Video Calling App Using WPF & Dyte

https://dyte.io/blog/building-video-calling-app-using-wpf-dyte/

Dyte (ライブビデオ、ビデオカンファレンスを扱うサービス) を使用してビデオ通話を行う WPF アプリケーションを実装する方法について。

.NETでのコンソールのバッファーとウィンドウについて - Qiita

https://qiita.com/rougemeilland/items/10f4d94c9343fd8eb708

.NET でのコンソールのバッファーとウィンドウの取り扱いについて。Console.Clear の挙動についても触れている。

Implementing an accessible, checkable WPF Tree View - Engineering@Microsoft

https://devblogs.microsoft.com/engineering-at-microsoft/implementing-an-accessible-checkable-wpf-tree-view/

Accessibility Insight チームが修正した WPF のチェックボックスを持つツリービューの実装について。

Working with Git in JetBrains Rider

https://andrewlock.net/working-with-git-in-jetbrains-rider/

JetBrains Rider での様々な Git 操作についての紹介。

Static Interface Members, Generic Attributes, Auto-Default Structs – Using C# 11 in Rider and ReSharper | The .NET Tools Blog

https://blog.jetbrains.com/dotnet/2023/03/14/static-interface-members-generic-attributes-auto-default-structs-using-csharp-11-in-rider-and-resharper/

JetBrains Rider と ReSharper での C# 11 の Static abstract members in interfaces やジェネリック属性、struct の自動デフォルトといった新機能をサポートする機能の紹介。

Improving the Spell Checker - Visual Studio Blog

https://devblogs.microsoft.com/visualstudio/improving-the-spell-checker/

Visual Studio 2022 17.6 Preview 2 でのスペルチェッカーの改善についての紹介。

プログラミング言語固有の辞書や除外辞書のエンコーディングの改善、特殊ケースでの検出の改善、スペルチェッカーのカスタマイズについてを紹介している。

特定フォルダー以下にあるプロジェクトで参照しているライブラリの一覧を取得する(.NET) - Qiita

https://qiita.com/karuakun/items/a6149a40d9c775a6665d

特定フォルダー以下にある .csproj から参照しているライブラリーの一覧を PowerShell で取得する方法について。

C#からGoogleスプレッドシートを操作してみる - Qiita

https://qiita.com/tat_tt/items/b9757cc940338c7deeab

C# から Google スプレッドシートを操作するための手順とデータの読み取り例の解説。

Azure Functions v3 to v4 (.NET 7.0)

https://zenn.dev/tessecraft_r/articles/1d3f83025e0830

.NET で実装した Azure Functions を v3 から v4 へと移行する際に行ったことを解説している記事。

ReactiveProperty v9.1 をリリースしました

https://zenn.dev/okazuki/articles/release-reactiveproperty-v9_1_0

ReactiveProperty v9.1 の新機能についての紹介。コマンドへの拡張メソッドや ReactivePropertiesValidator の改良といったポイントを解説している。

C# 11- Pattern Matching On Span For Constant String

https://www.c-sharpcorner.com/blogs/c-sharp-11-pattern-matching-on-span-for-constant-string

ReadOnlySpan<char> にはリストパターンマッチが使用できることについて。

ライブラリ、リポジトリ、ツールなど

dfederm/ReferenceTrimmer: Easily identify which dependencies can be removed from a .NET project

https://github.com/dfederm/ReferenceTrimmer

使用していない依存関係を簡単に洗い出すための MSBuild タスクと Roslyn Analyzer。

Azure/data-api-builder: Data API builder for Azure Databases provides modern REST and GraphQL endpoints to your Azure Databases.

https://github.com/Azure/data-api-builder

Azure Database (CosmosDB, MySQL, PostgreSQL, SQL Database) に対する REST/GraphQL ゲートウェイサーバー。

主に Azure Static Web Apps からデータベースにアクセスするために使用される。

wilder-minds/MinimalApiDiscovery: A .NET Core Library to support registering Minimal APIs in a Sane Way

https://github.com/wilder-minds/MinimalApiDiscovery

Minimal API を小分け(グループ)にして自動登録できるようにするライブラリー。

jsakamoto/BlazingStory: The clone of "Storybook" for Blazor, a frontend workshop for building UI components and pages in isolation.

https://github.com/jsakamoto/BlazingStory/

UI コンポーネントカタログ Storybook のBlazor 向けのクローン。

DamianEdwards/RazorSlices: Lightweight Razor-based templates for ASP.NET Core without MVC, Razor Pages, or Blazor.

https://github.com/DamianEdwards/RazorSlices

ASP.NET Core MVC や Razor Pages なしに Razor ベースのテンプレートを使用するライブラリー。

主に Minimal API のようなユースケースを想定したものとなっている。(ASP.NET Core MVC は使用しないが ASP.NET Core フレームワークには依存がある)