Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
187d85a
Adding CPM into Umbraco Project
LanThuyNguyen Feb 5, 2026
d073eef
Adding CPM for UmbracoExtension
LanThuyNguyen Feb 5, 2026
f7eeabe
remove CPM from umbraco templates
LanThuyNguyen Feb 5, 2026
7beacfe
remove change from readme
LanThuyNguyen Feb 5, 2026
f9c57a8
update readme for umbracoproject
LanThuyNguyen Feb 5, 2026
48ee990
Merge branch 'main' of https://github.com/umbraco/Umbraco-CMS into v1…
LanThuyNguyen Feb 9, 2026
379b20c
Adding CPM options to Umbraco Project and Umbraco Templates
LanThuyNguyen Feb 10, 2026
04342cf
Merge branch 'main' of https://github.com/umbraco/Umbraco-CMS into v1…
LanThuyNguyen Feb 10, 2026
eec7b33
Merge branch 'main' of https://github.com/umbraco/Umbraco-CMS into v1…
LanThuyNguyen Feb 11, 2026
edde4ab
update name param
LanThuyNguyen Feb 11, 2026
c23bfa3
make central to default option
LanThuyNguyen Feb 13, 2026
6b19074
Merge branch 'main' of https://github.com/umbraco/Umbraco-CMS into v1…
LanThuyNguyen Feb 13, 2026
bb782f0
Update templates/UmbracoExtension/Umbraco.Extension.csproj
NguyenThuyLan Feb 26, 2026
c1861d2
Update templates/UmbracoExtension/.template.config/template.json
NguyenThuyLan Feb 26, 2026
1479346
Update templates/UmbracoProject/.template.config/template.json
NguyenThuyLan Feb 26, 2026
d4097b8
Merge branch 'main' of https://github.com/umbraco/Umbraco-CMS into v1…
LanThuyNguyen Feb 26, 2026
592b2cb
add PackageManagement into Visual studio display
LanThuyNguyen Feb 26, 2026
a45159b
Apply suggestions from code review
AndyButland Feb 26, 2026
208828e
Fix ascii art and typo.
AndyButland Feb 26, 2026
96f00ce
Remove trailing commas in template.json files.
AndyButland Feb 26, 2026
2cfd64f
Aligned casing and grammar between package management choices.
AndyButland Feb 26, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@
"SiteDomain": {
"longName": "site-domain",
"shortName": "sd"
},
"PackageManagement": {
"longName": "package-management",
"shortName": "pm"
}
}
}
8 changes: 8 additions & 0 deletions templates/UmbracoExtension/.template.config/ide.host.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,14 @@
"id": "UmbracoVersion",
"isVisible": true
},
{
"id": "PackageManagement",
"isVisible": true,
"defaultValue": "Central",
"description": {
"text": "Choose how to manage NuGet package versions"
}
},
{
"id": "SupportPagesAndViews",
"isVisible": true,
Expand Down
31 changes: 30 additions & 1 deletion templates/UmbracoExtension/.template.config/template.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,29 @@
"defaultValue": "*",
"replaces": "UMBRACO_VERSION_FROM_TEMPLATE"
},
"PackageManagement": {
"type": "parameter",
"datatype": "choice",
"defaultValue": "Central",
"displayName": "Package Version Management",
"description": "Choose how to manage NuGet package versions",
"choices": [
{
"choice": "Central",
"displayName": "Central package management",
"description": "Use Directory.Packages.props (recommended for new standalone projects)"
},
{
"choice": "PerProject",
"displayName": "Per project",
"description": "Use versions in .csproj (recommended when adding to existing projects)"
}
]
},
"UseCPM": {
"type": "computed",
"value": "(PackageManagement == \"Central\")"
},
"SkipRestore": {
"displayName": "Skip restore",
"description": "If specified, skips the automatic restore of the project on create.",
Expand Down Expand Up @@ -131,8 +154,14 @@
"exclude": [
"[Cc]lient/src/dashboards/**"
]
},
{
"condition": "(!UseCPM)",
"exclude": [
"Directory.Packages.props"
]
}
]
}
]
}
}
15 changes: 15 additions & 0 deletions templates/UmbracoExtension/Directory.Packages.props
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<Project>
<PropertyGroup>
<ManagePackageVersionsCentrally>true</ManagePackageVersionsCentrally>
<!-- Allow floating versions so extensions can align with the host Umbraco project's package versions -->
<CentralPackageFloatingVersionsEnabled>true</CentralPackageFloatingVersionsEnabled>
</PropertyGroup>

<ItemGroup>
<!-- Umbraco API packages - Used by extension templates -->
<PackageVersion Include="Umbraco.Cms.Api.Common" Version="UMBRACO_VERSION_FROM_TEMPLATE" />
<PackageVersion Include="Umbraco.Cms.Api.Management" Version="UMBRACO_VERSION_FROM_TEMPLATE" />
<PackageVersion Include="Umbraco.Cms.Web.Common" Version="UMBRACO_VERSION_FROM_TEMPLATE" />
<PackageVersion Include="Umbraco.Cms.Web.Website" Version="UMBRACO_VERSION_FROM_TEMPLATE" />
</ItemGroup>
</Project>
19 changes: 16 additions & 3 deletions templates/UmbracoExtension/Umbraco.Extension.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,28 @@
<FrameworkReference Include="Microsoft.AspNetCore.App" />
</ItemGroup>

<!--#if (UseCPM) -->
<!-- Central package management - no versions -->
<ItemGroup>
<PackageReference Include="Umbraco.Cms.Api.Common" />
<PackageReference Include="Umbraco.Cms.Api.Management" />
<PackageReference Include="Umbraco.Cms.Web.Common" />
<PackageReference Include="Umbraco.Cms.Web.Website" />
</ItemGroup>
<!--#endif -->

<!--#if (!UseCPM) -->
<!-- Per-project - with versions -->
<ItemGroup>
<PackageReference Include="Umbraco.Cms.Web.Website" Version="UMBRACO_VERSION_FROM_TEMPLATE" />
<PackageReference Include="Umbraco.Cms.Web.Common" Version="UMBRACO_VERSION_FROM_TEMPLATE" />
<PackageReference Include="Umbraco.Cms.Api.Common" Version="UMBRACO_VERSION_FROM_TEMPLATE" />
<PackageReference Include="Umbraco.Cms.Api.Management" Version="UMBRACO_VERSION_FROM_TEMPLATE" />
<PackageReference Include="Umbraco.Cms.Web.Common" Version="UMBRACO_VERSION_FROM_TEMPLATE" />
<PackageReference Include="Umbraco.Cms.Web.Website" Version="UMBRACO_VERSION_FROM_TEMPLATE" />
</ItemGroup>
<!--#endif -->

<ItemGroup>
<!-- Dont include the client folder as part of packaging nuget build -->
<!-- Don't include the client folder as part of packaging nuget build -->
<Content Remove="Client\**" />

<!-- However make the Umbraco-package.json included for dotnet pack or nuget package and visible to the solution -->
Expand Down
4 changes: 4 additions & 0 deletions templates/UmbracoProject/.template.config/dotnetcli.host.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@
"longName": "use-delivery-api",
"shortName": "da"
},
"PackageManagement": {
"longName": "package-management",
"shortName": "pm"
},
"Docker": {
"longName": "add-docker",
"shortName": ""
Expand Down
8 changes: 8 additions & 0 deletions templates/UmbracoProject/.template.config/ide.host.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,14 @@
"text": "Umbraco Web Application - An empty Umbraco CMS web application."
},
"symbolInfo": [
{
"id": "PackageManagement",
"isVisible": true,
"defaultValue": "Central",
"description": {
"text": "Choose how to manage NuGet package versions"
}
},
{
"id": "UseHttpsRedirect",
"isVisible": true,
Expand Down
29 changes: 29 additions & 0 deletions templates/UmbracoProject/.template.config/template.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,12 @@
".dockerignore",
"entrypoint.sh"
]
},
{
"condition": "(!UseCPM)",
"exclude": [
"Directory.Packages.props"
]
}
]
}
Expand Down Expand Up @@ -80,6 +86,29 @@
]
}
},
"PackageManagement": {
"type": "parameter",
"datatype": "choice",
"defaultValue": "Central",
"displayName": "Package Version Management",
"description": "Choose how to manage NuGet package versions",
"choices": [
{
"choice": "Central",
"displayName": "Central package management",
"description": "Use Directory.Packages.props (recommended for new standalone projects)"
},
{
"choice": "PerProject",
"displayName": "Per project",
"description": "Use versions in .csproj (recommended when adding to existing projects)"
}
]
},
"UseCPM": {
"type": "computed",
"value": "(PackageManagement == \"Central\")"
},
"DotnetVersion": {
"type": "generated",
"generator": "switch",
Expand Down
14 changes: 14 additions & 0 deletions templates/UmbracoProject/Directory.Packages.props
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<Project>
<PropertyGroup>
<ManagePackageVersionsCentrally>true</ManagePackageVersionsCentrally>
<CentralPackageFloatingVersionsEnabled>true</CentralPackageFloatingVersionsEnabled>
</PropertyGroup>
<ItemGroup>
<PackageVersion Include="Umbraco.Cms" Version="UMBRACO_VERSION_FROM_TEMPLATE" />
<PackageVersion Include="Umbraco.Cms.DevelopmentMode.Backoffice" Version="UMBRACO_VERSION_FROM_TEMPLATE" />
<PackageVersion Include="Microsoft.ICU.ICU4C.Runtime" Version="72.1.0.3" />
<!--#if (StarterKit != "None") -->
<PackageVersion Include="STARTER_KIT_NAME" Version="STARTER_KIT_VERSION" />
<!--#endif -->
</ItemGroup>
</Project>
26 changes: 23 additions & 3 deletions templates/UmbracoProject/UmbracoProject.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,29 @@
<CompressionEnabled>false</CompressionEnabled> <!-- Disable compression. E.g. for umbraco backoffice files. These files should be precompressed by node and not let dotnet handle it -->
</PropertyGroup>

<!--#if (UseCPM) -->
<ItemGroup>
<PackageReference Include="Umbraco.Cms" Version="UMBRACO_VERSION_FROM_TEMPLATE" />
<PackageReference Include="Umbraco.Cms"/>
<!--#if (ModelsBuilderMode == "InMemoryAuto" || (DevelopmentMode == "BackofficeDevelopment" && ModelsBuilderMode == "Default")) -->
<PackageReference Include="Umbraco.Cms.DevelopmentMode.Backoffice" Version="UMBRACO_VERSION_FROM_TEMPLATE" />
<PackageReference Include="Umbraco.Cms.DevelopmentMode.Backoffice"/>
<!--#endif -->
<!--#if (StarterKit != "None") -->
<PackageReference Include="STARTER_KIT_NAME"/>
<!--#endif -->
</ItemGroup>

<ItemGroup>
<!-- Opt-in to app-local ICU to ensure consistent globalization APIs across different platforms -->
<PackageReference Include="Microsoft.ICU.ICU4C.Runtime"/>
<RuntimeHostConfigurationOption Include="System.Globalization.AppLocalIcu" Value="72.1.0.3" Condition="$(RuntimeIdentifier.StartsWith('linux')) or $(RuntimeIdentifier.StartsWith('win')) or ('$(RuntimeIdentifier)' == '' and !$([MSBuild]::IsOSPlatform('osx')))" />
</ItemGroup>
<!--#endif -->

<!--#if (!UseCPM) -->
<ItemGroup>
<PackageReference Include="Umbraco.Cms" Version="UMBRACO_VERSION_FROM_TEMPLATE"/>
<!--#if (ModelsBuilderMode == "InMemoryAuto" || (DevelopmentMode == "BackofficeDevelopment" && ModelsBuilderMode == "Default")) -->
<PackageReference Include="Umbraco.Cms.DevelopmentMode.Backoffice" Version="UMBRACO_VERSION_FROM_TEMPLATE"/>
<!--#endif -->
<!--#if (StarterKit != "None") -->
<PackageReference Include="STARTER_KIT_NAME" Version="STARTER_KIT_VERSION"/>
Expand All @@ -19,9 +38,10 @@

<ItemGroup>
<!-- Opt-in to app-local ICU to ensure consistent globalization APIs across different platforms -->
<PackageReference Include="Microsoft.ICU.ICU4C.Runtime" Version="72.1.0.3" />
<PackageReference Include="Microsoft.ICU.ICU4C.Runtime" Version="72.1.0.3"/>
<RuntimeHostConfigurationOption Include="System.Globalization.AppLocalIcu" Value="72.1.0.3" Condition="$(RuntimeIdentifier.StartsWith('linux')) or $(RuntimeIdentifier.StartsWith('win')) or ('$(RuntimeIdentifier)' == '' and !$([MSBuild]::IsOSPlatform('osx')))" />
</ItemGroup>
<!--#endif -->

<PropertyGroup>
<!-- Razor files are needed for the backoffice to work correctly -->
Expand Down
Loading