From 8d8592092fc950a7f994bb60853db8f422312001 Mon Sep 17 00:00:00 2001 From: Ronald Barendse Date: Thu, 19 May 2022 08:36:04 +0200 Subject: [PATCH] v10: Project template database/connection string improvements (#12407) * Add new connection-string-provider-name parameter * Use template value forms to correctly encode JSON values * Add new development-database-type parameter * Update package template and fix App_Plugins directory rename * Remove conflicting short parameter name * Lowercase framework parameter to align with MS templates * Cleanup default template settings * Write unattended install parameters when either connection string or development database is set * Include RootNamespace in UmbracoPackage template * Update Umbraco specific gitignore rules * Revert "Lowercase framework parameter to align with MS templates" This reverts commit 22de389272a7e119df569ec2e54190265f6d0ae0. * Add exclude-gitignore parameter * Update template schemas * Add minimal-gitignore parameter --- templates/Umbraco.Templates.nuspec | 30 +- .../.template.config/dotnetcli.host.json | 2 +- .../.template.config/ide.host.json | 6 +- .../.template.config/template.json | 32 +- .../UmbracoPackage/UmbracoPackage.csproj | 49 ++- .../build/UmbracoPackage.targets | 10 +- templates/UmbracoProject/.gitignore | 41 +-- .../.template.config/dotnetcli.host.json | 29 +- .../.template.config/ide.host.json | 48 ++- .../.template.config/template.json | 331 +++++++++--------- .../UmbracoProject/UmbracoProject.csproj | 8 +- .../appsettings.Development.json | 16 +- templates/UmbracoProject/appsettings.json | 5 +- 13 files changed, 296 insertions(+), 311 deletions(-) diff --git a/templates/Umbraco.Templates.nuspec b/templates/Umbraco.Templates.nuspec index 1b316044b5..7539d3a1f0 100644 --- a/templates/Umbraco.Templates.nuspec +++ b/templates/Umbraco.Templates.nuspec @@ -7,26 +7,26 @@ Umbraco HQ MIT https://umbraco.com/ - icon.png + icon.png https://umbraco.com/dist/nuget/logo-small.png false - Umbraco CMS templates for .NET Core Template Engine available through the dotnet CLI's new command + Umbraco CMS templates for .NET Core Template Engine available through the dotnet CLI's new command en-US umbraco - + - + - - - - - - - - - - - + + + + + + + + + + + diff --git a/templates/UmbracoPackage/.template.config/dotnetcli.host.json b/templates/UmbracoPackage/.template.config/dotnetcli.host.json index 0f64d676c1..6bd79b7fd9 100644 --- a/templates/UmbracoPackage/.template.config/dotnetcli.host.json +++ b/templates/UmbracoPackage/.template.config/dotnetcli.host.json @@ -1,5 +1,5 @@ { - "$schema": "http://json.schemastore.org/dotnetcli.host", + "$schema": "https://json.schemastore.org/dotnetcli.host.json", "symbolInfo": { "Framework": { "longName": "Framework", diff --git a/templates/UmbracoPackage/.template.config/ide.host.json b/templates/UmbracoPackage/.template.config/ide.host.json index baec9f98c6..0464cfeb1f 100644 --- a/templates/UmbracoPackage/.template.config/ide.host.json +++ b/templates/UmbracoPackage/.template.config/ide.host.json @@ -1,15 +1,15 @@ { - "$schema": "http://json.schemastore.org/vs-2017.3.host", + "$schema": "https://json.schemastore.org/ide.host.json", "order": 0, "icon": "../../icon.png", "description": { "id": "UmbracoPackage", - "text": "Umbraco Package - An empty Umbraco CMS package/plugin" + "text": "Umbraco Package - An empty Umbraco CMS package/plugin." }, "symbolInfo": [ { "id": "UmbracoVersion", - "isVisible": "true" + "isVisible": true } ] } diff --git a/templates/UmbracoPackage/.template.config/template.json b/templates/UmbracoPackage/.template.config/template.json index 5ba8fab1bd..d5aeaf7a82 100644 --- a/templates/UmbracoPackage/.template.config/template.json +++ b/templates/UmbracoPackage/.template.config/template.json @@ -1,5 +1,5 @@ { - "$schema": "http://json.schemastore.org/template", + "$schema": "https://json.schemastore.org/template.json", "author": "Umbraco HQ", "classifications": [ "Web", @@ -9,7 +9,7 @@ "Plugin" ], "name": "Umbraco Package", - "description": "An empty Umbraco package/plugin project ready to get started", + "description": "An empty Umbraco package/plugin project ready to get started.", "groupIdentity": "Umbraco.Templates.UmbracoPackage", "identity": "Umbraco.Templates.UmbracoPackage.CSharp", "shortName": "umbracopackage", @@ -44,30 +44,14 @@ "defaultValue": "10.0.0-rc1", "replaces": "UMBRACO_VERSION_FROM_TEMPLATE" }, - "namespaceReplacer": { - "type": "generated", - "generator": "regex", - "dataType": "string", - "parameters": { - "source": "name", - "steps": [ - { - "regex": "\\s", - "replacement": "_" - }, - { - "regex": "-", - "replacement": "_" - }, - { - "regex": "^[^a-zA-Z_]+", - "replacement": "_" - } - ] - }, + "Namespace": { + "type": "derived", + "valueSource": "name", + "valueTransform": "safe_namespace", + "fileRename": "UmbracoPackage", "replaces": "UmbracoPackage" }, - "msbuildReplacer": { + "MsBuildName": { "type": "generated", "generator": "regex", "dataType": "string", diff --git a/templates/UmbracoPackage/UmbracoPackage.csproj b/templates/UmbracoPackage/UmbracoPackage.csproj index dc41d3a6e1..cdab2646e0 100644 --- a/templates/UmbracoPackage/UmbracoPackage.csproj +++ b/templates/UmbracoPackage/UmbracoPackage.csproj @@ -1,29 +1,28 @@  - - net6.0 - . - UmbracoPackage - UmbracoPackage - UmbracoPackage - ... - ... - umbraco plugin package - UmbracoPackage - + + net6.0 + . + UmbracoPackage + UmbracoPackage + UmbracoPackage + ... + umbraco plugin package + UmbracoPackage + - - - - + + + + - - - true - Always - - - true - buildTransitive - - + + + true + Always + + + true + buildTransitive + + diff --git a/templates/UmbracoPackage/build/UmbracoPackage.targets b/templates/UmbracoPackage/build/UmbracoPackage.targets index 33d3689179..30fff5c159 100644 --- a/templates/UmbracoPackage/build/UmbracoPackage.targets +++ b/templates/UmbracoPackage/build/UmbracoPackage.targets @@ -1,5 +1,4 @@  - $(MSBuildThisFileDirectory)..\App_Plugins\UmbracoPackage\**\*.* @@ -8,16 +7,15 @@ - + - + - - + + - diff --git a/templates/UmbracoProject/.gitignore b/templates/UmbracoProject/.gitignore index 602728d104..088126cc3a 100644 --- a/templates/UmbracoProject/.gitignore +++ b/templates/UmbracoProject/.gitignore @@ -1,3 +1,4 @@ +#if (!MinimalGitignore) ## Ignore Visual Studio temporary files, build results, and ## files generated by popular Visual Studio add-ons. ## @@ -453,35 +454,27 @@ $RECYCLE.BIN/ !.vscode/launch.json !.vscode/extensions.json - +#endif ## -## Umbraco CMS .NETCore +## Umbraco CMS ## -# Dont commit Umbraco TEMP folder containing Examine Indexes, NuCache etc -**/umbraco/Data/TEMP/ +# JSON schema file for appsettings.json +appsettings-schema.json -# Umbraco log files -**/umbraco/Logs/ +# Packages created from the backoffice (package.xml/package.zip) +/umbraco/Data/CreatedPackages/ -# Umbraco backoffice language files -# Nuget package Umbraco.Cms.StaticAssets will copy them in during dotnet build -# Customize langguage files in /config/lang/{language}.user.xml -**/umbraco/config/lang/ +# Temp folder containing Examine indexes, NuCache, MediaCache, etc. +/umbraco/Data/TEMP/ -# JSON Schema file for appsettings -# This is auto generated from the build -**/umbraco/config/appsettings-schema.json +# SQLite database files +/umbraco/Data/*.sqlite.db +/umbraco/Data/*.sqlite.db-shm +/umbraco/Data/*.sqlite.db-wal -# This is the no-nodes, installer & upgrader pages from Umbraco -# Nuget package Umbraco.Cms.StaticAssets will copy them in during dotnet build -**/umbraco/UmbracoWebsite/ -**/umbraco/UmbracoInstall/ -**/umbraco/UmbracoBackOffice/ +# Log files +/umbraco/Logs/ -# Comment out the line below if you wish to change or add any new templates to PartialView Macros -**/umbraco/PartialViewMacros/ - -# Umbraco Static Assets of Backoffice -# Nuget package Umbraco.Cms.StaticAssets will copy them in during dotnet build -**/wwwroot/umbraco/ +# Media files +/wwwroot/media/ diff --git a/templates/UmbracoProject/.template.config/dotnetcli.host.json b/templates/UmbracoProject/.template.config/dotnetcli.host.json index f8be76765e..7f5479eab0 100644 --- a/templates/UmbracoProject/.template.config/dotnetcli.host.json +++ b/templates/UmbracoProject/.template.config/dotnetcli.host.json @@ -1,5 +1,5 @@ { - "$schema": "http://json.schemastore.org/dotnetcli.host", + "$schema": "https://json.schemastore.org/dotnetcli.host.json", "symbolInfo": { "Framework": { "longName": "Framework", @@ -17,6 +17,26 @@ "longName": "no-restore", "shortName": "" }, + "ExcludeGitignore": { + "longName": "exclude-gitignore", + "shortName": "" + }, + "MinimalGitignore": { + "longName": "minimal-gitignore", + "shortName": "" + }, + "ConnectionString": { + "longName": "connection-string", + "shortName": "" + }, + "ConnectionStringProviderName": { + "longName": "connection-string-provider-name", + "shortName": "" + }, + "DevelopmentDatabaseType": { + "longName": "development-database-type", + "shortName": "" + }, "UnattendedUserName": { "longName": "friendly-name", "shortName": "" @@ -29,10 +49,6 @@ "longName": "password", "shortName": "" }, - "ConnectionString": { - "longName": "connection-string", - "shortName": "" - }, "NoNodesViewPath": { "longName": "no-nodes-view-path", "shortName": "" @@ -44,8 +60,9 @@ }, "usageExamples": [ "dotnet new umbraco -n MyNewProject", - "dotnet new umbraco -n MyNewProjectUsingSqlCE -ce", "dotnet new umbraco -n MyNewProject --no-restore", + "dotnet new umbraco -n MyNewProject --development-database-type SQLite", + "dotnet new umbraco -n MyNewProject --development-database-type LocalDB", "dotnet new umbraco -n MyNewProject --friendly-name \"Friendly Admin User\" --email admin@example.com --password password1234 --connection-string \"Server=ConnectionStringHere\"" ] } diff --git a/templates/UmbracoProject/.template.config/ide.host.json b/templates/UmbracoProject/.template.config/ide.host.json index ee89dc80d7..617f924f97 100644 --- a/templates/UmbracoProject/.template.config/ide.host.json +++ b/templates/UmbracoProject/.template.config/ide.host.json @@ -1,47 +1,63 @@ { - "$schema": "http://json.schemastore.org/vs-2017.3.host", + "$schema": "https://json.schemastore.org/ide.host.json", "order": 0, "icon": "../../icon.png", "description": { "id": "UmbracoProject", - "text": "Umbraco Web Application - An empty Umbraco CMS web application" + "text": "Umbraco Web Application - An empty Umbraco CMS web application." }, "symbolInfo": [ { "id": "UmbracoVersion", - "isVisible": "true" + "isVisible": true }, { "id": "UseHttpsRedirect", - "isVisible": "true" + "isVisible": true }, { "id": "SkipRestore", - "isVisible": "true" + "isVisible": true }, { - "id": "UnattendedUserName", - "isVisible": "true" + "id": "ExcludeGitignore", + "isVisible": true }, { - "id": "UnattendedUserEmail", - "isVisible": "true" - }, - { - "id": "UnattendedUserPassword", - "isVisible": "true" + "id": "MinimalGitignore", + "isVisible": true }, { "id": "ConnectionString", - "isVisible": "true" + "isVisible": true + }, + { + "id": "ConnectionStringProviderName", + "isVisible": true + }, + { + "id": "DevelopmentDatabaseType", + "isVisible": true + }, + { + "id": "UnattendedUserName", + "isVisible": true + }, + { + "id": "UnattendedUserEmail", + "isVisible": true + }, + { + "id": "UnattendedUserPassword", + "isVisible": true }, { "id": "NoNodesViewPath", - "isVisible": "true" + "isVisible": true }, { "id": "PackageProjectName", - "isVisible": "true" + "isVisible": true } ] } diff --git a/templates/UmbracoProject/.template.config/template.json b/templates/UmbracoProject/.template.config/template.json index 91a4be1192..932c31ada6 100644 --- a/templates/UmbracoProject/.template.config/template.json +++ b/templates/UmbracoProject/.template.config/template.json @@ -1,5 +1,5 @@ { - "$schema": "http://json.schemastore.org/template", + "$schema": "https://json.schemastore.org/template.json", "author": "Umbraco HQ", "classifications": [ "Web", @@ -7,7 +7,7 @@ "Umbraco" ], "name": "Umbraco Project", - "description": "An empty Umbraco project ready to get started", + "description": "An empty Umbraco project ready to get started.", "groupIdentity": "Umbraco.Templates.UmbracoProject", "identity": "Umbraco.Templates.UmbracoProject.CSharp", "shortName": "umbraco", @@ -18,6 +18,18 @@ "sourceName": "UmbracoProject", "defaultName": "UmbracoProject1", "preferNameDirectory": true, + "sources": [ + { + "modifiers": [ + { + "condition": "(ExcludeGitignore)", + "exclude": [ + ".gitignore" + ] + } + ] + } + ], "symbols": { "Framework": { "displayName": "Framework", @@ -56,187 +68,173 @@ "datatype": "bool", "defaultValue": "false" }, - "UnattendedUserName": { - "displayName": "Unattended user name", - "description": "Used to specify the name of the default admin user when using unattended install (stored as plain text).", + "ExcludeGitignore": { + "displayName": "Exclude .gitignore", + "description": "Whether to exclude .gitignore from the generated template.", "type": "parameter", - "datatype": "string", - "defaultValue": "" + "datatype": "bool", + "defaultValue": "false" }, - "UnattendedUserNameReplacer": { - "type": "generated", - "generator": "regex", - "dataType": "string", - "parameters": { - "source": "UnattendedUserName", - "steps": [ - { - "regex": "\\\\", - "replacement": "\\\\" - }, - { - "regex": "\\\"", - "replacement": "\\\"" - }, - { - "regex": "\\\n", - "replacement": "\\\n" - }, - { - "regex": "\\\t", - "replacement": "\\\t" - } - ] - }, - "replaces": "UNATTENDED_USER_NAME_FROM_TEMPLATE" - }, - "UnattendedUserEmail": { - "displayName": "Unattended user email", - "description": "Used to specify the email of the default admin user when using unattended install (stored as plain text).", + "MinimalGitignore": { + "displayName": "Minimal .gitignore", + "description": "Whether to only include minimal (Umbraco specific) rules in the .gitignore.", "type": "parameter", - "datatype": "string", - "defaultValue": "" - }, - "UnattendedUserEmailReplacer": { - "type": "generated", - "generator": "regex", - "dataType": "string", - "parameters": { - "source": "UnattendedUserEmail", - "steps": [ - { - "regex": "\\\\", - "replacement": "\\\\" - }, - { - "regex": "\\\"", - "replacement": "\\\"" - }, - { - "regex": "\\\n", - "replacement": "\\\n" - }, - { - "regex": "\\\t", - "replacement": "\\\t" - } - ] - }, - "replaces": "UNATTENDED_USER_EMAIL_FROM_TEMPLATE" - }, - "UnattendedUserPassword": { - "displayName": "Unattended user password", - "description": "Used to specify the password of the default admin user when using unattended install (stored as plain text).", - "type": "parameter", - "datatype": "string", - "defaultValue": "" - }, - "UnattendedUserPasswordReplacer": { - "type": "generated", - "generator": "regex", - "dataType": "string", - "parameters": { - "source": "UnattendedUserPassword", - "steps": [ - { - "regex": "\\\\", - "replacement": "\\\\" - }, - { - "regex": "\\\"", - "replacement": "\\\"" - }, - { - "regex": "\\\n", - "replacement": "\\\n" - }, - { - "regex": "\\\t", - "replacement": "\\\t" - } - ] - }, - "replaces": "UNATTENDED_USER_PASSWORD_FROM_TEMPLATE" + "datatype": "bool", + "defaultValue": "false" }, "ConnectionString": { "displayName": "Connection string", "description": "Database connection string used by Umbraco.", "type": "parameter", "datatype": "string", - "defaultValue": "" - }, - "ConnectionStringReplacer": { - "type": "generated", - "generator": "regex", - "dataType": "string", - "parameters": { - "source": "ConnectionString", - "steps": [ - { - "regex": "\\\\", - "replacement": "\\\\" - }, - { - "regex": "\\\"", - "replacement": "\\\"" - }, - { - "regex": "\\\n", - "replacement": "\\\n" - }, - { - "regex": "\\\t", - "replacement": "\\\t" - } + "defaultValue": "", + "forms": { + "global": [ + "jsonEncode" ] }, "replaces": "CONNECTION_STRING_FROM_TEMPLATE" }, + "ConnectionStringProviderName": { + "displayName": "Connection string provider name", + "description": "Database connection string provider name used by Umbraco.", + "type": "parameter", + "datatype": "string", + "defaultValue": "Microsoft.Data.SqlClient", + "forms": { + "global": [ + "jsonEncode" + ] + }, + "replaces": "CONNECTION_STRING_PROVIDER_NAME_FROM_TEMPLATE" + }, "HasConnectionString": { "type": "computed", - "value": "(ConnectionString != \"\")" + "value": "(ConnectionString != '')" + }, + "DevelopmentDatabaseType": { + "displayName": "Development database type", + "description": "Database type used by Umbraco for development.", + "type": "parameter", + "datatype": "choice", + "choices": [ + { + "displayName": "None", + "description": "Do not configure a database for development.", + "choice": "None" + }, + { + "displayName": "SQLite", + "description": "Use embedded SQLite database.", + "choice": "SQLite" + }, + { + "displayName": "SQL Server Express LocalDB", + "description": "Use embedded LocalDB database (requires SQL Server Express with Advanced Services).", + "choice": "LocalDB" + } + ], + "defaultValue": "None" + }, + "DevelopmentConnectionString": { + "type": "generated", + "datatype": "string", + "generator": "switch", + "parameters": { + "cases": [ + { + "condition": "(DevelopmentDatabaseType == 'SQLite')", + "value": "Data Source=|DataDirectory|/Umbraco.sqlite.db;Cache=Shared;Foreign Keys=True;Pooling=True" + }, + { + "condition": "(DevelopmentDatabaseType == 'LocalDB')", + "value": "Data Source=(localdb)\\\\MSSQLLocalDB;AttachDbFilename=|DataDirectory|\\\\Umbraco.mdf;Integrated Security=True" + } + ] + }, + "replaces": "CONNECTION_STRING_DEVELOPMENT_FROM_TEMPLATE" + }, + "DevelopmentConnectionStringProviderName": { + "type": "generated", + "datatype": "string", + "generator": "switch", + "parameters": { + "cases": [ + { + "condition": "(DevelopmentDatabaseType == 'SQLite')", + "value": "Microsoft.Data.SQLite" + }, + { + "condition": "(true)", + "value": "Microsoft.Data.SqlClient" + } + ] + }, + "replaces": "CONNECTION_STRING_PROVIDER_NAME_DEVELOPMENT_FROM_TEMPLATE" + }, + "HasDevelopmentConnectionString": { + "type": "computed", + "value": "(DevelopmentConnectionString != '')" + }, + "UnattendedUserName": { + "displayName": "Unattended user name", + "description": "Used to specify the name of the default admin user when using unattended install on development (stored as plain text).", + "type": "parameter", + "datatype": "string", + "defaultValue": "", + "forms": { + "global": [ + "jsonEncode" + ] + }, + "replaces": "UNATTENDED_USER_NAME_FROM_TEMPLATE" + }, + "UnattendedUserEmail": { + "displayName": "Unattended user email", + "description": "Used to specify the email of the default admin user when using unattended install on development (stored as plain text).", + "type": "parameter", + "datatype": "string", + "defaultValue": "", + "forms": { + "global": [ + "jsonEncode" + ] + }, + "replaces": "UNATTENDED_USER_EMAIL_FROM_TEMPLATE" + }, + "UnattendedUserPassword": { + "displayName": "Unattended user password", + "description": "Used to specify the password of the default admin user when using unattended install on development (stored as plain text).", + "type": "parameter", + "datatype": "string", + "defaultValue": "", + "forms": { + "global": [ + "jsonEncode" + ] + }, + "replaces": "UNATTENDED_USER_PASSWORD_FROM_TEMPLATE" }, "UsingUnattenedInstall": { "type": "computed", - "value": "(UnattendedUserName != \"\" && UnattendedUserEmail != \"\" && UnattendedUserPassword != \"\" && ConnectionString != \"\")" + "value": "(UnattendedUserName != '' && UnattendedUserEmail != '' && UnattendedUserPassword != '' && (HasConnectionString || HasDevelopmentConnectionString))" }, "NoNodesViewPath": { "displayName": "No nodes view path", - "description": "Path to a custom view presented with the Umbraco installation contains no published content", + "description": "Path to a custom view presented with the Umbraco installation contains no published content.", "type": "parameter", "datatype": "string", - "defaultValue": "" - }, - "NoNodesViewPathReplacer": { - "type": "generated", - "generator": "regex", - "dataType": "string", - "parameters": { - "source": "NoNodesViewPath", - "steps": [ - { - "regex": "\\\\", - "replacement": "\\\\" - }, - { - "regex": "\\\"", - "replacement": "\\\"" - }, - { - "regex": "\\\n", - "replacement": "\\\n" - }, - { - "regex": "\\\t", - "replacement": "\\\t" - } + "defaultValue": "", + "forms": { + "global": [ + "jsonEncode" ] }, "replaces": "NO_NODES_VIEW_PATH_FROM_TEMPLATE" }, "HasNoNodesViewPath": { "type": "computed", - "value": "(NoNodesViewPath != \"\")" + "value": "(NoNodesViewPath != '')" }, "PackageProjectName": { "displayName": "Umbraco package project name", @@ -246,27 +244,10 @@ "defaultValue": "", "replaces": "PACKAGE_PROJECT_NAME_FROM_TEMPLATE" }, - "NamespaceReplacer": { - "type": "generated", - "generator": "regex", - "dataType": "string", - "parameters": { - "source": "name", - "steps": [ - { - "regex": "\\s", - "replacement": "_" - }, - { - "regex": "-", - "replacement": "_" - }, - { - "regex": "^[^a-zA-Z_]+", - "replacement": "_" - } - ] - }, + "Namespace": { + "type": "derived", + "valueSource": "name", + "valueTransform": "safe_namespace", "replaces": "Umbraco.Cms.Web.UI" }, "HttpPort": { diff --git a/templates/UmbracoProject/UmbracoProject.csproj b/templates/UmbracoProject/UmbracoProject.csproj index 182c1241ed..e34e743acb 100644 --- a/templates/UmbracoProject/UmbracoProject.csproj +++ b/templates/UmbracoProject/UmbracoProject.csproj @@ -13,7 +13,7 @@ - + @@ -25,9 +25,9 @@ true - - - + + + diff --git a/templates/UmbracoProject/appsettings.Development.json b/templates/UmbracoProject/appsettings.Development.json index e132ce944d..7567335326 100644 --- a/templates/UmbracoProject/appsettings.Development.json +++ b/templates/UmbracoProject/appsettings.Development.json @@ -17,9 +17,10 @@ } ] }, - //#if (HasConnectionString) + //#if (HasDevelopmentConnectionString) "ConnectionStrings": { - "umbracoDbDSN": "CONNECTION_STRING_FROM_TEMPLATE" + "umbracoDbDSN": "CONNECTION_STRING_DEVELOPMENT_FROM_TEMPLATE", + "umbracoDbDSN_ProviderName": "CONNECTION_STRING_PROVIDER_NAME_DEVELOPMENT_FROM_TEMPLATE" }, //#endif "Umbraco": { @@ -35,19 +36,12 @@ "Content": { "MacroErrors": "Throw" }, - "Global": { - "Smtp": { - "From": "your@email.here", - "Host": "localhost", - "Port": 25 - } - }, "Hosting": { "Debug": true }, "RuntimeMinification": { - "useInMemoryCache": true, - "cacheBuster": "Timestamp" + "UseInMemoryCache": true, + "CacheBuster": "Timestamp" } } } diff --git a/templates/UmbracoProject/appsettings.json b/templates/UmbracoProject/appsettings.json index 896d67d5fa..121e907020 100644 --- a/templates/UmbracoProject/appsettings.json +++ b/templates/UmbracoProject/appsettings.json @@ -10,9 +10,12 @@ } } }, + //#if (HasConnectionString) "ConnectionStrings": { - "umbracoDbDSN": null + "umbracoDbDSN": "CONNECTION_STRING_FROM_TEMPLATE", + "umbracoDbDSN_ProviderName": "CONNECTION_STRING_PROVIDER_NAME_FROM_TEMPLATE" }, + //#endif "Umbraco": { "CMS": { "Global": {