diff --git a/templates/UmbracoProject/.template.config/template.json b/templates/UmbracoProject/.template.config/template.json index e992165f0d4e..d9ae3a078eef 100644 --- a/templates/UmbracoProject/.template.config/template.json +++ b/templates/UmbracoProject/.template.config/template.json @@ -108,15 +108,19 @@ "type": "generated", "generator": "switch", "datatype": "text", - "description": "Not relevant at the moment, but if we need to change the dotnet version based on the Umbraco version, we can do it here", + "description": "Used to calculate the dotnet version to use, for latest we want to use dotnet 9 and for LTS we want to use dotnet 8", "replaces": "DOTNET_VERSION_FROM_TEMPLATE", "parameters": { "evaluator": "C++", "datatype": "text", "cases": [ { - "condition": "(true)", + "condition": "(UmbracoRelease == 'Latest')", "value": "net9.0" + }, + { + "condition": "(UmbracoRelease == 'LTS')", + "value": "net8.0" } ] } diff --git a/templates/UmbracoProject/UmbracoProject.csproj b/templates/UmbracoProject/UmbracoProject.csproj index d411fd4acc9b..019d5d2990cb 100644 --- a/templates/UmbracoProject/UmbracoProject.csproj +++ b/templates/UmbracoProject/UmbracoProject.csproj @@ -1,6 +1,5 @@ - net9.0 DOTNET_VERSION_FROM_TEMPLATE enable enable