From d959e0c165c637b4c72847f4fc1f687ce72f276e Mon Sep 17 00:00:00 2001
From: Jonathan Idland Olsnes <73334350+Jonathanio123@users.noreply.github.com>
Date: Thu, 29 Aug 2024 11:33:53 +0200
Subject: [PATCH] fix: Update Azure function deployment settings (#682)
Azure functions crashed due to missing the package
Microsoft.Extensions.Configuration.Abstractions and missing some
additional setting changes
---
.../Deployment/function.template.json | 6 +++++-
.../Fusion.Summary.Functions.csproj | 1 +
.../Deployment/function.template.json | 6 +++++-
.../Fusion.Resources.Functions.csproj | 1 +
src/backend/function/Fusion.Resources.Functions/Startup.cs | 2 +-
5 files changed, 13 insertions(+), 3 deletions(-)
diff --git a/src/Fusion.Summary.Functions/Deployment/function.template.json b/src/Fusion.Summary.Functions/Deployment/function.template.json
index 1e04bc54f..904f08f08 100644
--- a/src/Fusion.Summary.Functions/Deployment/function.template.json
+++ b/src/Fusion.Summary.Functions/Deployment/function.template.json
@@ -40,7 +40,7 @@
},
"netFrameworkVersion": {
"type": "string",
- "defaultValue": "v6.0"
+ "defaultValue": "v8.0"
}
},
"variables": {
@@ -97,6 +97,10 @@
"name": "FUNCTIONS_EXTENSION_VERSION",
"value": "~4"
},
+ {
+ "name": "FUNCTIONS_INPROC_NET8_ENABLED",
+ "value": "1"
+ },
{
"name": "WEBSITE_NODE_DEFAULT_VERSION",
"value": "~10"
diff --git a/src/Fusion.Summary.Functions/Fusion.Summary.Functions.csproj b/src/Fusion.Summary.Functions/Fusion.Summary.Functions.csproj
index 0327e7019..5a337f571 100644
--- a/src/Fusion.Summary.Functions/Fusion.Summary.Functions.csproj
+++ b/src/Fusion.Summary.Functions/Fusion.Summary.Functions.csproj
@@ -7,6 +7,7 @@
+
diff --git a/src/backend/function/Fusion.Resources.Functions/Deployment/function.template.json b/src/backend/function/Fusion.Resources.Functions/Deployment/function.template.json
index 5d18c6753..f7428b35f 100644
--- a/src/backend/function/Fusion.Resources.Functions/Deployment/function.template.json
+++ b/src/backend/function/Fusion.Resources.Functions/Deployment/function.template.json
@@ -41,7 +41,7 @@
},
"netFrameworkVersion": {
"type": "string",
- "defaultValue": "v6.0"
+ "defaultValue": "v8.0"
}
},
"variables": {
@@ -98,6 +98,10 @@
"name": "FUNCTIONS_EXTENSION_VERSION",
"value": "~4"
},
+ {
+ "name": "FUNCTIONS_INPROC_NET8_ENABLED",
+ "value": "1"
+ },
{
"name": "WEBSITE_NODE_DEFAULT_VERSION",
"value": "~10"
diff --git a/src/backend/function/Fusion.Resources.Functions/Fusion.Resources.Functions.csproj b/src/backend/function/Fusion.Resources.Functions/Fusion.Resources.Functions.csproj
index fe1b20455..884d12565 100644
--- a/src/backend/function/Fusion.Resources.Functions/Fusion.Resources.Functions.csproj
+++ b/src/backend/function/Fusion.Resources.Functions/Fusion.Resources.Functions.csproj
@@ -8,6 +8,7 @@
+
diff --git a/src/backend/function/Fusion.Resources.Functions/Startup.cs b/src/backend/function/Fusion.Resources.Functions/Startup.cs
index 42d6af813..0f1a5e503 100644
--- a/src/backend/function/Fusion.Resources.Functions/Startup.cs
+++ b/src/backend/function/Fusion.Resources.Functions/Startup.cs
@@ -17,7 +17,7 @@ public override void Configure(IFunctionsHostBuilder builder)
opts.Secret = cfg.GetValue("AzureAd_Secret");
opts.TenantId = cfg.GetValue("AzureAd_TenantId");
});
-
+
builder.Services.AddConfigServiceResolver();
builder.Services.AddHttpClients();
}