Skip to content

Commit b21b93d

Browse files
authored
Merge pull request #11103 from umbraco/v9/bugfix/dotnet-new-template-connectionstring
Fixes issue with dotnet new template if you did not specify a connection string
2 parents ac34a20 + 465d730 commit b21b93d

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

build/templates/UmbracoProject/.template.config/template.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -282,6 +282,10 @@
282282
]
283283
}
284284
},
285+
"HasConnectionString":{
286+
"type": "computed",
287+
"value": "(ConnectionString != \"\")"
288+
},
285289
"HasNoNodesViewPath":{
286290
"type": "computed",
287291
"value": "(NoNodesViewPath != \"\")"

build/templates/UmbracoProject/appsettings.Development.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,11 @@
1717
}
1818
]
1919
},
20+
//#if (HasConnectionString)
2021
"ConnectionStrings": {
2122
"umbracoDbDSN": "CONNECTION_FROM_TEMPLATE"
2223
},
24+
//#endif
2325
"Umbraco": {
2426
"CMS": {
2527
"Content": {

0 commit comments

Comments
 (0)