Skip to content

Upgrade template to .NET 10 with latest stable packages#26

Open
Copilot wants to merge 3 commits intomainfrom
copilot/update-template-to-dotnet-10
Open

Upgrade template to .NET 10 with latest stable packages#26
Copilot wants to merge 3 commits intomainfrom
copilot/update-template-to-dotnet-10

Conversation

Copy link
Copy Markdown

Copilot AI commented Feb 12, 2026

Template upgraded from .NET 8 to .NET 10. All NuGet packages updated to latest stable versions. Agent instructions added with requirement to ground version decisions in official Azure Functions documentation.

Configuration Updates

Framework target (6 files):

  • http/http.csproj: net8.0net10.0
  • infra/main.bicep: runtimeVersion: '8.0''10.0'
  • README.md, .vscode/tasks.json, .vscode/settings.json, azure.yaml: path and reference updates

NuGet packages (stable versions with compatibility fix):

<PackageReference Include="Microsoft.Azure.Functions.Worker" Version="2.51.0" />
<PackageReference Include="Microsoft.Azure.Functions.Worker.Extensions.Http.AspNetCore" Version="2.1.0" />
<PackageReference Include="Microsoft.Azure.Functions.Worker.Sdk" Version="2.0.7" />
<PackageReference Include="Microsoft.ApplicationInsights.WorkerService" Version="2.22.0" />
<PackageReference Include="Microsoft.Azure.Functions.Worker.ApplicationInsights" Version="2.50.0" />

Important: Microsoft.ApplicationInsights.WorkerService uses version 2.22.0 instead of 3.x because version 3.0.0 introduces breaking changes with OpenTelemetry migration that are incompatible with the current Azure Functions Worker. Version 2.22.0 is the latest stable 2.x release and works correctly with all Functions Worker packages.

Agent Instructions

Created .github/agents/copilot.md and .github/agents/claude.md with:

Testing

  • ✅ Build succeeded with no warnings or errors
  • ✅ Local testing with func start successful on .NET 10.0.2
  • ✅ HTTP GET endpoint tested: returns "Hello, World."
  • ✅ HTTP POST endpoint tested: returns expected personalized message
  • ✅ Functions running with Worker v2.51.0.0
  • ✅ Application logging working correctly

Security model (managed identity, TLS 1.2, optional VNet) and architecture (isolated worker, Flex Consumption) unchanged.

Original prompt

This section details on the original issue you should resolve

<issue_title>Upgrade this template to .NET 10</issue_title>
<issue_description>This template is .net 8. Update it to .NET 10 in all files, especially the csproj, README, and /infra/main.bicep

Also check the csproj and nuget packages to get the latest supported/stable (non preview) versions.

create agent instructions for copilot and claude for the future. ensure the guidance is always grounded by fetching https://learn.microsoft.com/en-us/azure/azure-functions/supported-languages first. </issue_description>

Comments on the Issue (you are @copilot in this section)


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

…nd create agent instructions

Co-authored-by: paulyuk <1968137+paulyuk@users.noreply.github.com>
Copilot AI changed the title [WIP] Upgrade template to .NET 10 and update dependencies Upgrade template to .NET 10 with latest stable packages Feb 12, 2026
Copilot AI requested a review from paulyuk February 12, 2026 04:48
@paulyuk paulyuk marked this pull request as ready for review February 13, 2026 06:02
@paulyuk
Copy link
Copy Markdown
Contributor

paulyuk commented Feb 13, 2026

@copilot test local func start according to readme and verify changes

Co-authored-by: paulyuk <1968137+paulyuk@users.noreply.github.com>
Copy link
Copy Markdown
Author

Copilot AI commented Feb 13, 2026

@copilot test local func start according to readme and verify changes

Completed local testing with func start according to README instructions. All tests passed successfully:

Test Results:

  • ✅ Function app runs on .NET 10.0.2 (Worker v2.51.0.0)
  • ✅ Both functions loaded: httpget and httppost
  • ✅ GET /api/httpget → HTTP 200: "Hello, World."
  • ✅ POST /api/httppost → HTTP 200: "Hello, Awesome Developer! You are 25 years old."

Issue Found & Fixed:
Discovered ApplicationInsights compatibility issue - version 3.0.0 has breaking changes causing TypeLoadException. Fixed by downgrading to v2.22.0 (latest stable 2.x).

Fixed in commit: 42f5445

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • cdn.functions.azure.com
    • Triggering command: /usr/bin/func func start --port 7071 (dns block)
    • Triggering command: /usr/bin/func func start --port 7071 /var/lib/dpkg/info/libtss2-mu-4.0.1-0t64:amd64.list /var/lib/dpkg/info/libharfbuzz0b:amd64.list /var/lib/dpkg/info/libjson-xs-perl.list /var/lib/dpkg/info/libdrm-amdgpu1:amd64.list /var/lib/dpkg/info/shellcheck.list /var/lib/dpkg/info/libclang1-16t64.list /var/lib/dpkg/info/libfbclient2:amd64.list /var/lib/dpkg/info/usb-modeswitch-data.list (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

Copilot AI requested a review from paulyuk February 13, 2026 06:11
@paulyuk
Copy link
Copy Markdown
Contributor

paulyuk commented Feb 13, 2026

@copilot flag this breaking change issue and guidance with a new issue in this repo: https://github.com/Azure/azure-functions-dotnet-worker

Copy link
Copy Markdown
Author

Copilot AI commented Feb 13, 2026

@copilot flag this breaking change issue and guidance with a new issue in this repo: https://github.com/Azure/azure-functions-dotnet-worker

I cannot create issues in external repositories directly. However, here's the issue content you can create in Azure/azure-functions-dotnet-worker:

Title: Microsoft.ApplicationInsights.WorkerService 3.0.0 incompatible with Azure Functions Worker - Breaking change

Description:
The Microsoft.ApplicationInsights.WorkerService 3.0.0 release introduces breaking changes that cause runtime failures with Azure Functions isolated worker model.

Error:

TypeLoadException: Could not load type 'Microsoft.ApplicationInsights.Extensibility.ITelemetryInitializer' from assembly 'Microsoft.ApplicationInsights, Version=3.0.0.1'

Root Cause:
Version 3.0.0 migrated to OpenTelemetry with breaking changes to ITelemetryInitializer and other extensibility points, which are incompatible with the current Functions Worker telemetry integration.

Workaround:
Use Microsoft.ApplicationInsights.WorkerService version 2.22.0 (latest stable 2.x) instead of 3.x with:

  • Microsoft.Azure.Functions.Worker 2.51.0
  • Microsoft.Azure.Functions.Worker.ApplicationInsights 2.50.0

Impact:
Projects upgrading to .NET 10 may inadvertently upgrade to ApplicationInsights 3.x and encounter runtime failures.

Recommendation:
Document this compatibility constraint or update Microsoft.Azure.Functions.Worker.ApplicationInsights to support ApplicationInsights 3.x SDK.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Upgrade this template to .NET 10

2 participants