Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This pull request updates the MSBuild target in Umbraco.Templates.csproj to dynamically set the UmbracoVersion symbol's default value to the current package version during the build process. This ensures that the .NET templates use the correct Umbraco version by default when developers create new projects or extensions.
Changes:
- Adds a
JsonPathUpdateValuetask to update theUmbracoVersionsymbol'sdefaultValuein template.json files during the build
Zeegaan
approved these changes
Feb 25, 2026
Member
Zeegaan
left a comment
There was a problem hiding this comment.
LGTM 🚀
Thank you for the very detailed testing steps 💪
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
The
umbraco-extensiontemplate defaults its Umbraco package references to*, which causes CI builds to pull the latest version instead of the version matching the installed template package.The can cause the problem outlined in #21889.
To fix I've applied the same
JsonPathUpdateValueMSBuild fix that was added for theumbracoproject template in #13481 — updating$.symbols.UmbracoVersion.defaultValuefrom*to$(PackageVersion)duringdotnet packTesting
Firstly run the following to install a new extension project:
Open up
TestExtension.csprojand note the project references all use "*":Now run a
dotnet packfrom this PR. Perhaps the easiest way is save the*.nupkgfiles generated from this PR into a local folder.Delete the
TestExtensionfolder and run:Open up
TestExtension.csprojand note the project references all use the matching version: