-
Notifications
You must be signed in to change notification settings - Fork 2.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add new 'Umbraco Package RCL' project template #13460
Add new 'Umbraco Package RCL' project template #13460
Conversation
…r in Umbraco Package project template
…ameter in Umbraco project template and persist selected parameters
"Framework": { | ||
"longName": "Framework", | ||
"shortName": "F" | ||
"longName": "framework", | ||
"isHidden": true |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The only allowed framework version is net7.0
, so there's no need to show this parameter.
Since this value isn't supported on older Umbraco versions, any unaltered command would result in an ...is not a valid value...
error, so I've also updated the capitalization to align with the default ASP.NET Core templates.
@@ -41,9 +41,16 @@ | |||
"description": "The version of Umbraco.Cms to add as PackageReference.", | |||
"type": "parameter", | |||
"datatype": "string", | |||
"defaultValue": "10.0.0-rc1", | |||
"defaultValue": "11.0.0", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This value is automatically updated in the Azure Pipelines build script (causing the generated NuGet package to always contain the same Umbraco version number as itself), but we might want to update the source to at least the latest major version or otherwise a more generic *
version...
@@ -37,7 +36,8 @@ | |||
}, | |||
{ | |||
"id": "DevelopmentDatabaseType", | |||
"isVisible": true | |||
"isVisible": true, | |||
"persistenceScope": "templateGroup" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Adding this persistenceScope
value will make your IDE remember the last used value, making it easier to set your preferred options once and re-use that for all future projects created from this template.
Prerequisites
Description
With PR #13141 merged, packages targeting v11 can now be distributed as a Razor Class Library, removing the need for custom MSBuild targets that copy files into the Umbraco project and simplifying the reference between the package and test site project.
This PR adds a new 'Umbraco Package RCL' (
dotnet new umbracopackage-rcl
) project template that is basically the same as the default 'Razor Class Library' template, but includes references to the CMS and a samplepackage.manifest
file. Developers can still choose to use existing 'Umbraco Package' (dotnet new umbracopackage
) template, e.g. if they want to support an older Umbraco version.To test, pack and install the templates from this PR using:
Then go to a new empty folder and create a new package including a test site using:
Now inspect and ensure the following:
Our.Umbraco.MyPackage.1.0.0.nupkg
contains the default RCL build props and thestaticwebsassets
folder contains thepackage.manifest
file;publish\wwwroot\App_Plugins\Our.Umbraco.MyPackage\package.manifest
exists);You can also do a sanity check and test whether adding tours, icons, dashboards, language files, etc. to the package works, but that is already done as part of the linked PR.