From 4f96d87c64c11e4ae694099f1ce83b21215827ba Mon Sep 17 00:00:00 2001 From: Brett Samblanet Date: Tue, 12 Nov 2024 15:18:18 -0800 Subject: [PATCH 1/4] net9.0 sample cleanup --- samples/Net9FunctionApp/Net9FunctionApp.csproj | 11 +++++------ samples/Net9FunctionApp/NuGet.Config | 7 ------- samples/Net9FunctionApp/Program.cs | 18 +++++++++--------- ...ker.Extensions.Http.AspNetCore.Tests.csproj | 1 - 4 files changed, 14 insertions(+), 23 deletions(-) delete mode 100644 samples/Net9FunctionApp/NuGet.Config diff --git a/samples/Net9FunctionApp/Net9FunctionApp.csproj b/samples/Net9FunctionApp/Net9FunctionApp.csproj index 9784363c2..0eeb39865 100644 --- a/samples/Net9FunctionApp/Net9FunctionApp.csproj +++ b/samples/Net9FunctionApp/Net9FunctionApp.csproj @@ -4,15 +4,14 @@ v4 Exe enable - enable + enable - - - - - + + + + diff --git a/samples/Net9FunctionApp/NuGet.Config b/samples/Net9FunctionApp/NuGet.Config deleted file mode 100644 index d8f90e261..000000000 --- a/samples/Net9FunctionApp/NuGet.Config +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - \ No newline at end of file diff --git a/samples/Net9FunctionApp/Program.cs b/samples/Net9FunctionApp/Program.cs index c2df7fbe4..e0260b707 100644 --- a/samples/Net9FunctionApp/Program.cs +++ b/samples/Net9FunctionApp/Program.cs @@ -1,14 +1,14 @@ -using Microsoft.Azure.Functions.Worker; +using Microsoft.Azure.Functions.Worker; +using Microsoft.Azure.Functions.Worker.Builder; using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Hosting; -var host = new HostBuilder() - .ConfigureFunctionsWebApplication() - .ConfigureServices(services => - { - services.AddApplicationInsightsTelemetryWorkerService(); - services.ConfigureFunctionsApplicationInsights(); - }) - .Build(); +var builder = FunctionsApplication.CreateBuilder(args); +builder.ConfigureFunctionsWebApplication(); + +builder.Services.AddApplicationInsightsTelemetryWorkerService(); +builder.Services.ConfigureFunctionsApplicationInsights(); + +var host = builder.Build(); host.Run(); diff --git a/test/extensions/Worker.Extensions.Http.AspNetCore.Tests/Worker.Extensions.Http.AspNetCore.Tests.csproj b/test/extensions/Worker.Extensions.Http.AspNetCore.Tests/Worker.Extensions.Http.AspNetCore.Tests.csproj index 99ed1e4db..d8e416a7c 100644 --- a/test/extensions/Worker.Extensions.Http.AspNetCore.Tests/Worker.Extensions.Http.AspNetCore.Tests.csproj +++ b/test/extensions/Worker.Extensions.Http.AspNetCore.Tests/Worker.Extensions.Http.AspNetCore.Tests.csproj @@ -30,7 +30,6 @@ - From 5b7a7289d1d151165dfc32085386a1e7da0fefea Mon Sep 17 00:00:00 2001 From: Brett Samblanet Date: Tue, 12 Nov 2024 15:19:56 -0800 Subject: [PATCH 2/4] adding settings --- samples/Net9FunctionApp/local.settings.json | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 samples/Net9FunctionApp/local.settings.json diff --git a/samples/Net9FunctionApp/local.settings.json b/samples/Net9FunctionApp/local.settings.json new file mode 100644 index 000000000..401ae0c34 --- /dev/null +++ b/samples/Net9FunctionApp/local.settings.json @@ -0,0 +1,7 @@ +{ + "IsEncrypted": false, + "Values": { + "FUNCTIONS_WORKER_RUNTIME": "dotnet-isolated", + "AzureWebJobsStorage": "UseDevelopmentStorage=true" + } +} \ No newline at end of file From c14c2ee8d5c5547a1fdc4db08cca7faccd280ed1 Mon Sep 17 00:00:00 2001 From: Brett Samblanet Date: Tue, 12 Nov 2024 15:25:13 -0800 Subject: [PATCH 3/4] spaces --- samples/Net9FunctionApp/Net9FunctionApp.csproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/samples/Net9FunctionApp/Net9FunctionApp.csproj b/samples/Net9FunctionApp/Net9FunctionApp.csproj index 0eeb39865..59f34c617 100644 --- a/samples/Net9FunctionApp/Net9FunctionApp.csproj +++ b/samples/Net9FunctionApp/Net9FunctionApp.csproj @@ -4,7 +4,7 @@ v4 Exe enable - enable + enable From ed717b62fda2b85674a538550683929457daab93 Mon Sep 17 00:00:00 2001 From: Brett Samblanet Date: Tue, 12 Nov 2024 15:29:06 -0800 Subject: [PATCH 4/4] pr comments --- samples/Net9FunctionApp/Net9FunctionApp.csproj | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/samples/Net9FunctionApp/Net9FunctionApp.csproj b/samples/Net9FunctionApp/Net9FunctionApp.csproj index 59f34c617..7bd0775c7 100644 --- a/samples/Net9FunctionApp/Net9FunctionApp.csproj +++ b/samples/Net9FunctionApp/Net9FunctionApp.csproj @@ -3,8 +3,6 @@ net9.0 v4 Exe - enable - enable @@ -13,16 +11,4 @@ - - - PreserveNewest - - - PreserveNewest - Never - - - - - \ No newline at end of file