2023-04-23: Windows Community Toolkit 2023 Update

Published on Sunday, 23 April 2023

トピックス

The Windows Community Toolkit 2023 Update - #ifdef Windows

https://devblogs.microsoft.com/ifdef-windows/the-windows-community-toolkit-2023-update/

Windows Community Toolkit のアップデートについて。

新しい WCT Lab コンポーネントや次期バージョンでのコンポーネント、名前空間の統一についてといったことを紹介している。

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

Azure Functions と LINE Messaging API を使って ChatGPT とやり取りできるサービスを作ってみた

https://zenn.dev/takunology/articles/linebotandazure-gpt

Azure Functions と OpenAI の ChatGPT API を使用して LINE ボットを実装する方法について。

SetWindowSubclass によるウィンドウプロシージャーのカスタム(C# / WinUI 3)

https://zenn.dev/shinta0806/articles/de27f23a0c3684

WinUI 3 アプリケーションでウィンドウプロシージャーのカスタム(ウィンドウのサブクラス化)を行う方法について。

WindowsのServiceを簡単にデバッグする方法 - Qiita

https://qiita.com/TheParkSider/items/dc0aa0a03c02cec462e6

Windows のサービスを実装した際にデバッグ実行などを簡単にする方法について。

Improving the Syntax Highlighting of JavaScript in Visual Studio - Visual Studio Blog

https://devblogs.microsoft.com/visualstudio/improving-the-syntax-highlighting-of-javascript-in-visual-studio/

Visual Studio 2022 v17.6 以降での JavaScript のシンタックスハイライトの改善についての紹介。

How to Use Aqua Web Inspector for ASP.NET Core Development in Rider | The .NET Tools Blog

https://blog.jetbrains.com/dotnet/2023/04/20/jetbrains-rider-and-aqua-for-aspnetcore-development/

Rider で利用できる JetBrains Aqua プラグインで IDE に組み込まれた Web インスペクターを ASP.NET Core 開発で使用する方法について。

Git Tooling Preview Features to Enhance Productivity - Visual Studio Blog

https://devblogs.microsoft.com/visualstudio/git-tooling-preview-features-to-enhance-productivity/

Visual Studio (プレビュー) で強化された Git 関連機能のまとめ記。

Reduce Collection Lookups With ReSharper | The .NET Tools Blog

https://blog.jetbrains.com/dotnet/2023/04/18/reduce-lookups-in-hashset-dictionary-and-other-collections-with-resharper/

ReSharper で Dictionary や HashSet といったコレクションの ContainsKey や Contains を呼び出してから操作することの不要なケースについて指摘できるようになったことについて。

Chrome extensions in .NET web view controls

https://dev.to/dotnetbrowser/chrome-extensions-in-net-web-view-controls-11lm

DotNetBrowser をはじめとして WebView2、CefSharp といった Web View での Chrome 拡張のサポート状況について。

Format and send .Net application logs to Elasticsearch using Serilog

https://medium.com/@ingrid.jardillier/format-and-send-net-application-logs-to-elasticsearch-using-serilog-9819742cf806

Serilog から Elasticsearch にログを送信するように構成する手順について。

.NETアプリケーションがHTTP通信に使用したプロキシ設定をメモリダンプから確認する - Qiita

https://qiita.com/nishiseki/items/fe3e4795df9f790831f7

.NET アプリケーションのメモリーダンプを取得し、そのメモリーダンプから HTTP のプロキシー設定情報を解析して確認する方法について。

Running non-root .NET containers with Kubernetes - .NET Blog

https://devblogs.microsoft.com/dotnet/running-nonroot-kubernetes-with-dotnet/

.NET 8 で対応する non-root なコンテナーの Kubernetes での利用について、サンプルを交えて紹介している。dotnet-monitor に関しても動作することのこと。

【Xamarin/C#】スマホでVR写真表示アプリを作る

https://zenn.dev/daddy_yukio/articles/a70e04b8896f15

Xamarin.Forms で360度全天球映像を表示する実装について。

Setting an Absolute Output Path for .NET SDK Projects

https://weblog.west-wind.com/posts/2023/Apr/21/Setting-an-Absolute-Output-Path-for-NET-SDK-Projects

ビルド時の出力先パスの指定方法と AppendTargetFrameworkToOutputPath によるターゲットフレームワークをパスに追加しない指定について。

Investigating a crash in Enumerable.LastOrDefault with a custom collection - Gérald Barré

https://www.meziantou.net/investigating-a-crash-in-enumerable-lastordefault.htm

カスタムコレクションで LINQ の LastOrDefault メソッドを使用した際にスレッドセーフではない操作によって例外が発生するケースについての解説。

.NET 8 Performance Edition

https://steven-giesel.com/blogPost/f6504300-7bf0-48d2-8a14-ba4e2bbea02e

.NET 8 とそれ以前でのパフォーマンスを Enum, LINQ, Reflection やリストといった部分でのベンチマークによる比較。

Azure OpenAI Service の C# SDK (ChatGPT でも使えます)

https://zenn.dev/microsoft/articles/azure-openai-service-csharpsdk

ChatGPT を含む Azure OpenAI Service の .NET SDK を使用してみるという記事。

C#でQR画像入りExcelを作る(NPOI、ZXing)

https://zenn.dev/junnuj/articles/a68409f9e18fd0

ZXing.NET で QR コードを生成して NPOI を使用して Excel に画像を埋め込む方法について。

Semantic Kernelを使ってGPTと外部ツールを簡単に連携してみる - Taste of Tech Topics

https://acro-engineer.hatenablog.com/entry/2023/04/18/120000

Semantic Kernel を使用して ChatGPT API と外部ツールである Elasticsearch を連携させる実装方法について。

[雑記] 明確な代入ルール | ++C++; // 未確認飛行 C ブログ

https://ufcpp.net/study/csharp/start/definiteassignment/

未初期化を避けるための明確に代入するルールについて。C# 10で改善された点についても触れている。

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

microsoft/Tokenizer: .NET implementation of BPE tokenizer for OpenAI LLMs.

https://github.com/microsoft/Tokenizer

OpenAI の tiktoken というトークンをカウントするライブラリーの .NET 実装。

CalvinAllen/vs4mac-super-clean: Super Clean is an extension for Visual Studio for Mac that, when triggered, completely obiterates the bin and obj directories from all projects in the solution

https://github.com/CalvinAllen/vs4mac-super-clean

obj や bin ディレクトリをすべて削除する Visual Studio for Mac 用拡張。

bUnit-dev/bUnit: bUnit is a testing library for Blazor components that make tests look, feel, and runs like regular unit tests. bUnit makes it easy to render and control a component under test’s life-cycle, pass parameter and inject services into it, trigger event handlers, and verify the rendered markup from the component using a built-in semantic HTML comparer.

https://github.com/bUnit-dev/bUnit

Blazor のコンポーネントをテストしやすくするためのライブラリー。