Skip to main content

umbraco-nullable-reference-types

Write and fix Umbraco 17+ C# and Razor code under C# nullable reference types (NRT), which Umbraco has enabled since v10. Covers which Umbraco APIs return null (Value<T>() returning T?, Parent, GetById, Models Builder properties, media and picker values), the TryGetUmbracoContext / TryGetUmbracoHelper accessor pattern with [NotNullWhen] flow analysis, Razor null handling, and turning on <Nullable>enable</Nullable> with WarningsAsErrors=nullable without scattering the null-forgiving operator. Use this when the user mentions "nullable reference types", "NRT", CS8602 / CS8600 / CS8603 / CS8618 warnings in an Umbraco project, "possible null reference", "dereference of a possibly null reference", "null-forgiving operator", or asks to make Umbraco code null-safe. SKIP: non-Umbraco projects, Umbraco versions before 10, and general C# NRT questions with no Umbraco API involved.

ソース情報

リポジトリ
umbraco/Umbraco-CMS-Implementation-Skills
ソースの最終更新活動
2026年10月21日 08:57
検出された SKILL.md の言語
英語
スター
7
フォーク
8

インストール方法

デフォルトでは、最初にソースを確認する Prompt が選択されています。直接コマンドに切り替えるか、ローカルコピーをダウンロードすることもできます。

ソースファイルを確認

インストールを決める前に、SKILL.md と SkillsMP に表示されている付属ファイルをお読みください。

ファイルエクスプローラー
14 ファイル

SKILL.md を表示中

SKILL.md
ソースの指示 · 読み取り専用プレビュー
nameumbraco-nullable-reference-types
descriptionWrite and fix Umbraco 17+ C# and Razor code under C# nullable reference types (NRT), which Umbraco has enabled since v10. Covers which Umbraco APIs return null (Value<T>() returning T?, Parent, GetById, Models Builder properties, media and picker values), the TryGetUmbracoContext / TryGetUmbracoHelper accessor pattern with [NotNullWhen] flow analysis, Razor null handling, and turning on <Nullable>enable</Nullable> with WarningsAsErrors=nullable without scattering the null-forgiving operator. Use this when the user mentions "nullable reference types", "NRT", CS8602 / CS8600 / CS8603 / CS8618 warnings in an Umbraco project, "possible null reference", "dereference of a possibly null reference", "null-forgiving operator", or asks to make Umbraco code null-safe. SKIP: non-Umbraco projects, Umbraco versions before 10, and general C# NRT questions with no Umbraco API involved.