Add a new Umbraco extension project reference to the main Umbraco instance and solution
Installation
Mit Codex oder Claude installieren Kopieren Sie diesen Prompt, fügen Sie ihn in Codex, Claude oder einen anderen Assistant ein und lassen Sie die Skill-Seite prüfen und installieren.
Add a new Umbraco extension project reference to the main Umbraco instance and solution
version
1.1.0
location
managed
allowed-tools
Read, Edit, Glob, Grep, Bash
Add Extension Reference to Umbraco Instance
What is it?
After creating a new Umbraco backoffice extension project, it must be added as a project reference in the main Umbraco instance's .csproj file. Without this reference, the extension will not be loaded when running the Umbraco site.
If a solution file (.sln) exists, the extension should also be added to it for proper IDE support (Visual Studio, Rider). This is optional - the extension will work without being in the solution.
When to Use
Use this skill after:
Creating a new extension with dotnet new umbraco-extension
Moving or copying an extension project to your solution
Setting up a new extension from the umbraco-backoffice blueprints
Workflow
Step 1: Find the Main Umbraco Project
The main Umbraco instance .csproj file must be discovered dynamically. Search for it using these criteria:
# Find all .csproj files
Glob: **/*.csproj
# Then search for the one containing Umbraco.Cms package reference
Grep: Umbraco\.Cms" Version (in *.csproj files)
The main Umbraco project will have:
A <PackageReference Include="Umbraco.Cms" ...> entry
SDK of Microsoft.NET.Sdk.Web
Usually located at the solution root or in a dedicated folder
Step 2: Read the Project File
Once found, read the .csproj file to understand its structure and find where <ProjectReference> entries are located.
Step 3: Calculate Relative Path
Calculate the relative path from the main project's directory to the new extension's .csproj file:
Use forward slashes / (cross-platform compatible)
Path is relative to the main .csproj file's directory
Example paths:
Extension Location
Example Relative Path
Sibling folder
../MyExtension/MyExtension.csproj
Subfolder
./extensions/MyExtension/MyExtension.csproj
Skills folder
../.claude/skills/.../MyExtension.csproj
Step 4: Add the ProjectReference
Add a <ProjectReference> entry in an <ItemGroup>:
<ItemGroup><!-- Existing references --><ProjectReferenceInclude="../ExistingExtension/ExistingExtension.csproj" /><!-- Add new extension here --><ProjectReferenceInclude="../NewExtension/NewExtension.csproj" /></ItemGroup>
If there's already an <ItemGroup> with <ProjectReference> entries, add to that one. Otherwise, create a new <ItemGroup>.
Step 5: Add Extension to Solution File (Optional)
If a solution file (.sln) exists, the extension project should be added to it for proper IDE support. This step is optional - not all projects use solution files.
Find the solution file:
# Find any .sln files in the workspace
Glob: **/*.sln
# If solution is at ./MySite/MySite.sln and extension is at ./MyExtension/MyExtension.csproj
dotnet sln ./MySite/MySite.sln add ./MyExtension/MyExtension.csproj
When a solution file exists, adding the extension ensures:
The extension appears in Visual Studio/Rider solution explorer
Building the solution builds the extension
IDE features like "Go to Definition" work across projects