2022-06-18: .NET 7 Preview 5, Arm64 Visual Studio, .NET 6.0.6 and .NET Core 3.1.26

Published on Saturday, 18 June 2022

トピックス

Announcing .NET 7 Preview 5 - .NET Blog

https://devblogs.microsoft.com/dotnet/announcing-dotnet-7-preview-5/

.NET 7 Preview 5 がリリースされた。

記事では Preview 5 での改善点として下記のものを紹介している。

  • オブザーバビリティ
  • System.Text.Json
    • ポリモーフィズム
    • Utf8JsonReader.CopyString
    • ソースコード生成の改善
  • System.IO
    • ReadExactly, ReadAtLeast
  • RegexGenerator のための新しい Roslyn アナライザーと CodeFix
  • Generic Math
  • System.Reflection を利用したメソッド呼び出しのパフォーマンス向上
  • ML.NET テキスト分類 API
  • CodeGen (JIT)
  • トリミングの有効化

Arm64 Visual Studio - Visual Studio Blog

https://devblogs.microsoft.com/visualstudio/arm64-visual-studio/

Visual Studio 2022 17.3 Preview 2 で ARM64 環境での Visual Studio 自身のネイティブ実行サポートが追加された。

現時点では重要なワークロードして C++ 開発 (MSBuild)、.NET Framework と .NET でのデスクトップ (WinForms, WPF) 開発、.NET による Web 開発がサポートされている。拡張機能の移行に関しては別途ブログで解説されるとのこと。

インストーラーは x64 と共通となっているためプラットフォームに合わせてインストールされる。またインストールには既存のバージョンのアンインストールが必要となっている点に注意が必要。

Announcing Entity Framework 7 Preview 5 - .NET Blog

https://devblogs.microsoft.com/dotnet/announcing-ef7-preview5/

Entity Framework 7 Preview 5 についての記事。

Entity Framework 7 Preview 5 では SQL Server での AT TIME ZONE コマンドやコマンドと接続のインターセプト、DeleteBehavior 属性の追加などが行われているが、記事では Table-per-concrete-type (TPC) についてフォーカスして紹介している。

ASP.NET Core updates in .NET 7 Preview 5 - .NET Blog

https://devblogs.microsoft.com/dotnet/asp-net-core-updates-in-dotnet-7-preview-5/

.NET 7 Preview 5 での ASP.NET Core のアップデートについての記事。

  • JWT 認証の改善と自動認証設定
    • 認証構成の簡素化
    • エンドポイントの許可ポリシー
    • 開発時の JWT の管理を行う dotnet user-jwts
  • Minimal API の引数リストのパラメーターバインディング

.NET 7 Preview 5 - Generic Math - .NET Blog

https://devblogs.microsoft.com/dotnet/dotnet-7-generic-math/

.NET 7 で提供される static abstract member in interface の活用である Generic Math についての記事。

記事では Generic Math によってどのようなことが可能となるか、.NET 6 でのプレビューからの変更点、インターフェースをはじめとした API について紹介している。

.NET June 2022 Updates – .NET 6.0.6 and .NET Core 3.1.26 - .NET Blog

https://devblogs.microsoft.com/dotnet/june-2022-updates/

.NET 6.0.6 と .NET Core 3.1.26 がリリースされた。

このリリースでは不具合とセキュリティーに関する修正が含まれている。 セキュリティーに関しては NuGet の認証情報が漏洩してしまうことがある問題が修正されている。

記事では .NET 5 のサポートが終了していること、.NET Core 3.1 のサポートも2022年12月13日に終了することにも触れている。

.NET Framework June 2022 Security and Quality Rollup Updates - .NET Blog

https://devblogs.microsoft.com/dotnet/net-framework-june-2022-security-and-quality-rollup-updates/

.NET Framework の2022年6月の累積アップデートがリリースされた。

このリリースには新しいセキュリティー修正は含まれておらず、GC やその他の問題に関する修正が含まれている。

Visual Studio for Mac 17.3 Preview 2 is now available - Visual Studio Blog

https://devblogs.microsoft.com/visualstudio/visual-studio-for-mac-17-3-preview-2-is-now-available/

Visual Studio for Mac 17.3 Preview 2 がリリースされた。

このリリースでは不具合の修正や改善と MAUI のサポートの改善が含まれている。

Introducing the ML.NET Text Classification API (preview) - .NET Blog

https://devblogs.microsoft.com/dotnet/introducing-the-ml-dotnet-text-classification-api-preview/

ML.NET にプレビューとして追加されたテキスト分類 API についての紹介記事。

VNext License Changes · Discussion #2151 · SixLabors/ImageSharp

https://github.com/SixLabors/ImageSharp/discussions/2151

ImageSharp のライセンスを現在の Apache License から商用利用向けのライセンス体系に変更を検討しているという Discussion。

OneService Journey to .NET 6 - .NET Blog

https://devblogs.microsoft.com/dotnet/one-service-journey-to-dotnet-6/

OneService と呼ばれる Microsoft Start、Microsoft Edge、Windows などでのコンテンツ体験を提供するサービスを .NET Framework から .NET 6 に移行した事例紹介記事。

事例のハイライトには次のものをあげている。

  • インフラストラクチャーコストの 29% 削減
  • 移行したサービスの CPU 使用率の平均 30% 向上
  • 主な API の P95 レイテンシーが 8~27% 改善
  • 技術的負債の解消により、毎年の継続的な .NET のアップグレード
  • 生産的なチーム

記事では移行の流れや、その間に行われていた手法について紹介している。

  • OneService について
  • 移行ステージ
  • 最初の移行の試み
  • .NET Framework 上での ASP.NET Core 2.1 への移行
  • .NET 6 への移行
  • パフォーマンスの改善
  • コスト削減
  • その他の恩恵
  • 運用環境における A/B テスト
  • 運用環境のミラーリング
    • 運用環境のトラフィック1%をミラーリングして処理するカナリアクラスター
  • 運用環境へのデプロイ
  • ASP.NET から ASP.NET Core への移行
    • レスポンスの gzip/Brotli 圧縮が外れていて Azure Front Door/Akamai のコストが増えるまで気づかなかった話
  • API 課題
    • OData
    • ServicePointManager の非推奨化

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

June 9, 2022 - .NET Data Biweekly Updates (2022)

https://github.com/dotnet/efcore/issues/27185

.NET のデータアクセス関連のアップデート 2022年6月9日号。

Entity Framework 7 でのアップデートを中心に取り上げている。

Maybe it's time to rethink our project structure with .NET 6

https://timdeschryver.dev/blog/maybe-its-time-to-rethink-our-project-structure-with-dot-net-6

.NET 6 の ASP.NET Core の Minimal API に合わせてプロジェクト構成を再考してはどうかという記事。

Introducing the New Website | NUKE

https://nuke.build/blog/2022/06/15/new-website/

NUKE の新しい Web サイトが公開された。

Is CodeLens Enabled?

https://dev.to/calvinallen/is-codelens-enabled-7p7

Visual Studio の拡張から CodeLens が有効になっているかどうかを取得する方法についての記事。

How does PackageReference work?

https://dfederm.com/how-does-packagereference-work/

PackageReference が内部でどのように処理され、情報が保持されているのかを解説する記事。

Troubleshooting CPU and exceptions issues with Datadog toolbox

https://chnasarre.medium.com/troubleshooting-cpu-and-exceptions-issues-with-datadog-toolbox-6ec4b2481da

Datadog .NET Tracer を使用して Datadog APM 上で CPU や例外に関する問題のトラブルシュートについての記事。

New Profiler feature in Visual Studio

https://devblogs.microsoft.com/visualstudio/new-profiler-feature-in-visual-studio/

Visual Studio 2022 17.2 で導入された新しいプロファイリングツールの紹介記事。

新しいプロファイリングツールではファイル I/O に関するパフォーマンス情報を取得できるようになっている。

https://zenn.dev/okazuki/articles/blazor-oreore-auth-part3

ASP。NET Core Blazor Server で Cookie を使用せず認証を行い、セッション中は維持する方法についての記事。

Dependency Injection for Native AOT

https://codevision.medium.com/dependency-injection-for-native-aot-e6cc90bef395

NativeAOT 環境下で DI を使用する場合に NativeAOT のリフレクションフリーモードでも正しく動作させるにはどうすればよいのかという記事。

C# 11 static abstract members - NDepend

https://blog.ndepend.com/c-11-static-abstract-members

C# 11 (.NET 7) の static abstract members in interfaces についての解説記事。

New Resources to Get Started with .NET MAUI - .NET Blog

https://devblogs.microsoft.com/dotnet/learn-dotnet-maui/

.NET MAUI を始めるのに役立つリソースの紹介記事。

What’s New in Visual Studio: Make it Your Home - Visual Studio Blog

https://devblogs.microsoft.com/visualstudio/whats-new-vs/

Visual Studio 2022 17.3 Preview 1 以降で導入された、バージョンアップでの新機能などを紹介する What's New ページについて。

[Preview版] .NET 7(C# 11) で導入される Generic math

https://zenn.dev/naminodarie/articles/a355451cc7a4a3

C# 11 (.NET 7) で導入される Generic Math の簡単な例の紹介記事。

A brief introduction to DiagnosticSource

https://andrewlock.net/a-brief-introduction-to-diagnostic-source/

DiagnosticSource についての簡単な解説記事。

他のロギングの仕組みとの違いやリッスンしてイベントを購読する方法などについて触れている。

Share debug configuration between .NET IDEs with launch profiles

https://dev.to/kaylumah/share-debug-configuration-between-net-ides-with-launch-profiles-4k8p

Visual Studio や Rider といった IDE での起動プロファイルを使用したデバッグ起動時の設定についての記事。

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

dotnet-symbol: Symbols download utility

https://www.nuget.org/packages/dotnet-symbol

シンボルファイルをダウンロードするツール。

pharring/SettingsStoreExplorer: A Visual Studio Extension with a tool window for viewing and editing the contents of Visual Studio's Settings Store.

https://github.com/pharring/SettingsStoreExplorer

Visual Studio の設定ストアを表示、編集する拡張。

GitHub - Avanade/Beef: Business Entity Execution Framework

https://github.com/Avanade/Beef

ASP.NET Core をベースとしたコード生成による Web API 実装のためのフレームワーク。

DeepDive

API Proposal: UnreachableException · Issue #35324 · dotnet/runtime

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

コード上到達しないことを表す UnreachableException の導入。

コードカバレッジツールでの到達不能コードの認識や JIT でのコールドパスとして扱うといったことが可能になる。