2023-01-28: Key Trends for C#, Microsoft.Data.SqlClient 5.1.0, Uno Platform 4.7

Published on Saturday, 28 January 2023

トピックス

https://blog.jetbrains.com/dotnet/2023/01/26/the-developer-ecosystem-in-2022-key-trends-for-c/

JetBrains による2022年の開発者エコシステムでの C# の主なトレンドの調査。

  • C# のバージョン
  • 開発対象の分野
  • 使用しているランタイムのバージョン
  • 使用している IDE やエディター
  • Visual Studio / Visual Studio Code でのプラグイン
  • ユニットテストに使用しているフレームワーク
  • プロファイラーや診断ツールを使用する頻度

Introducing the Git Status Bar and Testing Improvements in Visual Studio for Mac 17.5 - Visual Studio Blog

https://devblogs.microsoft.com/visualstudio/introducing-the-git-status-bar-and-testing-improvements-in-visual-studio-for-mac-17-5/

Visual Studio for Mac 17.5 Preview 3 での Git ステータスバーとテスト関連の機能の改善について。

ステータスバーから Git のブランチを確認変更するといった機能が追加されている。

Release Stable Release v5.1.0 · dotnet/SqlClient

https://github.com/dotnet/SqlClient/releases/tag/v5.1.0

Microsoft.Data.SqlClient 5.1.0 がリリースされた。

このリリースでは TimeOnly, DateOnly を含む .NET 6 のサポート、SQL Server 2022 の TDS8 と TLS 1.3 のサポート、ARM64 .NET Framework のサポート、.NET Core 3.1 のサポートの削除などが含まれている。

Uno Platform 4.7 – New Project Template, Performance Improvements and more

https://platform.uno/blog/uno-platform-4-7-new-project-template-performance-improvements-and-more/

Uno Platform 4.7 がリリースされた。

このリリースでは新しいプロジェクトテンプレート、フォントの共有、WebAssembly や NativeAOT、Android などでのパフォーマンスの改善が行われた。

Release v7.0.1 · npgsql/npgsql

https://github.com/npgsql/npgsql/releases/tag/v7.0.1

Npgsql 7.0.1 がリリースされた。

このリリースではデッドロックやなどいくつかの不具合が修正されている。

Release v1.2.3 · microsoft/WindowsAppSDK

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

Windows App SDK 1.2.3 がリリースされた。

このリリースでは複数のウィンドウを閉じた際にクラッシュする問題などいくつかの問題が修正されている。

ReSharper Tools and Rider 2022.3.2 Bug-fix Updates Have Arrived! | The .NET Tools Blog

https://blog.jetbrains.com/dotnet/2023/01/27/resharper-rider-2022-3-2/

ReSharper と Rider 2022.3.2 がリリースされた。

それぞれ ASP.NET Core プロジェクトでクラッシュする問題や誤ってエラーとなってしまう問題などが修正されている。

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

MemoryPackで独自のバージョニングを行う | Yucchiy's Note

https://blog.yucchiy.com/2023/01/memorypack-custom-versioning/

MemoryPack のシリアライズ時に追加の情報を埋め込むことで独自のバージョニングを実現する方法について。

Using Command Binding in Windows Forms apps to go Cross-Platform - .NET Blog

https://devblogs.microsoft.com/dotnet/winforms-cross-platform-dotnet-maui-command-binding/

.NET 7 の Windows Forms で可能となったコマンドバインディングを使用して MVVM パターンを実現し、.NET MAUI とのコードの共有を試みることについて。

Generating argument expressions for minimal APIs: Behind the scenes of minimal APIs - Part 4

https://andrewlock.net/behind-the-scenes-of-minimal-apis-4-generating-argument-expressions-for-minimal-apis/

Minimal APIs の裏側でハンドラーの引数の式ツリーの構築やオプショナルな引数の取り扱いなどについての解説。

WPFとWinFormsを汎用ホストに簡易に組み込む

https://zenn.dev/nin_neko/articles/292f8a6f0d7ee4

WPF と Windows Forms アプリケーションで Generic Host を使用する方法について。

[C#] Visual Studioで独自の警告を作ってチームで共有する

https://zenn.dev/tackme31/articles/2e57a1b1f592ff

独自の Roslyn アナライザーと CodeFix の開発方法とローカルパッケージでの配布方法について。

5 .NET MAUI Features for Building Great Desktop Apps - .NET Blog

https://devblogs.microsoft.com/dotnet/5-dotnet-maui-desktop-features/

.NET MAUI のデスクトップアプリ向けの5つの機能を紹介。

  • マルチウィンドウ
  • メニューバー
  • コンテキストメニュー
  • ツールチップ
  • ポインタージェスチャー

Keyboard Shortcuts to Master Your Git Flow in Visual Studio - Visual Studio Blog

https://devblogs.microsoft.com/visualstudio/keyboard-shortcuts-to-master-your-git-flow-in-visual-studio/

Visual Studio で Git フローに役立つキーボードショートカットを紹介している。

A Simple Union Between .NET Core and Python

https://dev.to/devleader/a-simple-union-between-net-core-and-python-5949

Pythonnet を使用して .NET から Python 呼び出す例の簡単な紹介。

Basic Authentication in ASP.NET Core | Software Engineering

https://damienbod.com/2023/01/23/basic-authentication-in-asp-net-core/

idunno.Authentication.Basic パッケージを使用して ASP.NET Core アプリケーションに Basic 認証を実装する方法について。

Tracing .NET Applications Easily With OpenTelemetry - Code Maze

https://code-maze.com/tracing-dotnet-applications-opentelemetry/

OpenTelemetry を使用して .NET アプリケーションのトレースを取得する方法について。

記事では SQL Server へのクエリーの取得や、Jaeger を使用して表示する手順についても触れている。

C# 12: Primary Constructors

https://steven-giesel.com/blogPost/a210c97e-fe68-45de-afa1-d053d75f6f7d

C# 12 で導入候補となっているプライマリーコンストラクターについての解説。

EF Core debugging part 1

https://dev.to/karenpayneoregon/ef-core-debugging-part-1-512f

Entity Framework Core で開発中のデバッグに役立つ機能とログの記録方法についての紹介

Static libraries

https://ericsink.com/native_aot/mul_cpp_win_static.html

NativeAOT で静的ライブラリーとして発行することと、その場合に発生するほかにリンクすべきライブラリーがあることについて。

Getting started with integration testing for your Minimal API

https://dev.to/this-is-learning/getting-started-with-integration-testing-for-your-minimal-api-3j0l

Minimal APIs で実装した ASP.NET Core アプリケーションの統合テストをする方法について。

Steve Sanderson Wows Web-Devs with Peek at 'Blazor United' for .NET 8 -- Visual Studio Magazine

https://visualstudiomagazine.com/articles/2023/01/26/blazor-united.aspx

.NET 8 の Blazor 向けに開発しているプロトタイプ Blazor United について。

Blazor United は Razor Pages、Blazor Server、Blazor WebAssembly がクライアント上でシームレスに移行していく仕組みを提供するプロトタイプとなっている。

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

Cysharp/StructureOfArraysGenerator: Structure of arrays source generator to make CPU Cache and SIMD friendly data structure for high-performance code in .NET and Unity.

https://github.com/Cysharp/StructureOfArraysGenerator

Structure of Arrays と呼ばれるデータ構造を簡単に扱えるようにする Source Generator

サイト、ドキュメントなど

ツイート

Visual Studio 2022 Preview では .http ファイルによる VSCode の REST Client のようなことができるという話。

Visual Studio 2022 Preview では ASP.NET Core プロジェクトのエンドポイントを確認できる Endpoints Explorer を利用できるという話(Rider には似た機能がある)

Deep Dive

[API Proposal]: Non-cooperative abortion of code execution · Issue #69622 · dotnet/runtime

https://github.com/dotnet/runtime/issues/69622

.NET 7 から実行しているコードを強制的に中断できる ControlledExecution.Run というメソッドが追加されている。

アプリケーションの内部状態が保証されない可能性があるため、運用環境ではなく REPL のようなものでの利用を想定しているものとなっている。

WASI support tracking · Issue #65895 · dotnet/runtime

https://github.com/dotnet/runtime/issues/65895

.NET での WASI (WebAssembly System Interface) のサポートの進行状況の Issue。