Add new 'Umbraco Package RCL' project template#13460
Add new 'Umbraco Package RCL' project template#13460ronaldbarendse wants to merge 3 commits intorelease/11.0from
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.
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.
| "type": "parameter", | ||
| "datatype": "string", | ||
| "defaultValue": "10.0.0-rc1", | ||
| "defaultValue": "11.0.0", |
There was a problem hiding this comment.
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...
| "id": "DevelopmentDatabaseType", | ||
| "isVisible": true | ||
| "isVisible": true, | ||
| "persistenceScope": "templateGroup" |
There was a problem hiding this comment.
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.manifestfile. 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.nupkgcontains the default RCL build props and thestaticwebsassetsfolder contains thepackage.manifestfile;publish\wwwroot\App_Plugins\Our.Umbraco.MyPackage\package.manifestexists);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.