-
Notifications
You must be signed in to change notification settings - Fork 465
Open
Labels
Description
Background
The Azure Functions host will eventually stop servicing .NET 6 in-process. Once that happens, the in-proc branch of Core Tools should target .NET 8 only for in-proc support. This issue tracks the planning and work required to cleanly remove the net6.0 target framework from the in-proc build.
The codebase currently multi-targets net6.0 and net8.0, with net6-specific logic spread across ~18 files spanning the CLI project, build system, CI pipelines, static resources, and tests.
Scope
This change applies only to the in-proc branch. The main branch (OOP/isolated) is unaffected.
Work Items
1. Project files — remove net6.0 from TargetFrameworks
src/Azure.Functions.Cli/Azure.Functions.Cli.csproj- Change
<TargetFrameworks>net6.0;net8.0</TargetFrameworks>→<TargetFrameworks>net8.0</TargetFrameworks> - Remove the
net6.0-onlyPropertyGroup(lines 23-27) that gatesIsPackable,PackAsTool, andToolCommandName— move these to the default or thenet8.0condition. - Remove the
net8.0-only<IsPackable>false</IsPackable>group (lines 28-30) since net8 becomes the only TFM and should now be packable. - Remove the
net6.0conditionalItemGroupforSystem.Text.Json(v6.0.11). Keep thenet8.0group or make it unconditional.
- Change
test/Azure.Functions.Cli.Tests/Azure.Functions.Cli.Tests.csproj- Change
<TargetFrameworks>net6.0;net8.0</TargetFrameworks>→<TargetFrameworks>net8.0</TargetFrameworks>
- Change
2. C# code — remove net6 constants, helpers, and conditional logic
src/Azure.Functions.Cli/Common/TargetFramework.cs- Remove
public const string net6 = "net6.0";
- Remove
src/Azure.Functions.Cli/Helpers/TargetFrameworkHelper.cs- Remove
TargetFramework.net6fromsupportedTargetFrameworksandsupportedInProcTargetFrameworksarrays.
- Remove
src/Azure.Functions.Cli/Common/Utilities.cs- Remove
#if NET6_0preprocessor branch (line ~50).
- Remove
src/Azure.Functions.Cli/Actions/HostActions/StartHostAction.cs- Remove unused
Net6FrameworkDescriptionPrefixconstant.
- Remove unused
src/Azure.Functions.Cli/Actions/LocalActions/InitAction.cs- Change
DefaultInProcTargetFrameworkfromnet6tonet8. - Update
ValidateTargetFrameworkfallback. - Update Dockerfile selection logic that falls through to net6 isolated Dockerfile.
- Change
src/Azure.Functions.Cli/Helpers/DotnetHelpers.cs- Remove/update comment about .NET 6.0
dotnet newshort name behavior.
- Remove/update comment about .NET 6.0
src/Azure.Functions.Cli/Actions/AzureActions/PublishFunctionAppAction.cs- Remove help text referencing
.NET 6.
- Remove help text referencing
3. Build system — remove --inproc6 path
build/BuildSteps.cs- Remove
Net6TargetFrameworkconstant andNet6TargetFrameworkArgument(--inproc6). - Simplify
Initialize()— default target framework is alwaysnet8.0. - Remove conditional
NoWorkersflag that was net6-specific. - Remove/simplify language worker removal logic tied to the net6 build.
- Remove
build/Settings.cs- Change default
TargetFrameworkfrom"net6.0"to"net8.0"(line ~180, used for nupkg publish path).
- Change default
build.ps1- Remove
inproc6artifact target framework option.
- Remove
pipelineUtilities.psm1- Remove .NET 6.0 SDK entry from
$DotnetSDKVersionRequirements.
- Remove .NET 6.0 SDK entry from
validateWorkerVersions.ps1- Remove
"net6.0" { "6" }case from the TFM → digit switch. - Default
$TargetFrameworkparameter to"net8.0"(already the default — just verify).
- Remove
4. CI/CD pipelines — remove inproc6 build jobs
eng/ci/public-build.yml- Remove the
BuildInproc6job and itsartifactTargetFramework: inproc6/tfm: net6.0parameters.
- Remove the
eng/ci/official-build.yml- Remove the
BuildInproc6job, thefunc-cli-inproc6artifact publication step, and relatedtargetPathentries.
- Remove the
eng/ci/templates/public/jobs/build-test-public.yml- Remove
.NET 6.0SDK install steps.
- Remove
eng/ci/templates/official/jobs/build-test.yml- Remove
.NET 6.0SDK install steps.
- Remove
5. NuGet packaging
src/Azure.Functions.Cli/Azure.Functions.Cli.nuspec- Currently uses
$targetFramework$which resolves tonet6.0since only the net6 build was packable. After the change, this will resolve tonet8.0. Verify the nuspec paths and NuGet tool pack still work correctly.
- Currently uses
src/Azure.Functions.Cli/Azure.Functions.Cli.csproj- Ensure
NuspecPropertiespasses the correcttargetFrameworkvalue.
- Ensure
6. Static resources
src/Azure.Functions.Cli/StaticResources/stacks.json- Remove the
.NET 6 In-process/dotnet6stack entry (lines ~243-290). - Evaluate whether
.NET 6 Isolated(dotnet6isolated, lines ~145-198) should also be removed — this depends on OOP servicing, not just in-proc. May be out of scope.
- Remove the
src/Azure.Functions.Cli/StaticResources/Dockerfile.dotnetIsolated- This is the net6 isolated Dockerfile (
dotnet-isolated:4-dotnet-isolated6.0). Evaluate whether it should be removed or kept for OOP compatibility.
- This is the net6 isolated Dockerfile (
src/Azure.Functions.Cli/StaticResources/Dockerfile.dotnet- This is the net6 in-proc Dockerfile. Remove it.
7. Tests
test/Azure.Functions.Cli.Tests/E2E/InitTests.cs- Update assertion that expects
"Valid options are net8.0, net6.0"— net6 will no longer be valid. - Remove
[InlineData("dotnet-isolated", "4", "net6.0")]test case for Dockerfile init.
- Update assertion that expects
test/Azure.Functions.Cli.Tests/ZipHelperTests.cs- Remove/update comment referencing net6.
8. VS Code workspace config (optional / local-only)
.vscode/launch.json— Update debug program path fromnet6.0tonet8.0..vscode/tasks.json— Remove"net6.0"from thepickStringpublish target framework options.
Sequencing / Prerequisites
- Confirm host EOL date for .NET 6 in-proc — align this work with the host team's timeline.
- Land the per-TFM InProc package split first (see related issue) — this allows us to stop updating the net6 InProc version immediately, even before fully removing it.
- Coordinate with downstream consumers (VS, VS Code extension, VS for Mac) that may depend on the net6 build artifacts (
func-cli-inproc6). - Execute the removal per the work items above.
- Validate — full CI pass,
func startwith .NET 8 in-proc app, NuGet pack, publish across all RIDs.
Risk / Open Questions
- NuGet tool packaging — The
PackAsToolproperty was gated onnet6.0. After moving it tonet8.0, verify the global tool install (dotnet tool install -g Azure.Functions.CoreTools) still works. - Downstream artifact names — Pipelines publish artifacts like
func-cli-inproc6. Consumers that reference this artifact name will break. Requires coordination. - Isolated .NET 6 support — Removing net6 in-proc doesn't necessarily mean removing net6 isolated stacks/Dockerfiles. Clarify scope with the team.
Reactions are currently unavailable