[MSBUILD SDK] Add support for multi-targeted function apps#3333
Merged
jviau merged 9 commits intofeature/msbuild-sdkfrom Mar 12, 2026
Merged
[MSBUILD SDK] Add support for multi-targeted function apps#3333jviau merged 9 commits intofeature/msbuild-sdkfrom
jviau merged 9 commits intofeature/msbuild-sdkfrom
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Adds MSBuild SDK support for multi-targeted Azure Functions apps by generating/restoring a Functions extensions project per TFM.
Changes:
- Update extension generation pipeline to operate on per-TFM project items (projects + packages tagged with TFMs).
- Extend validation/resolution tasks and targets to carry TFM metadata through restore/build.
- Expand unit + integration tests to cover multi-target restore/build and incremental behavior.
Reviewed changes
Copilot reviewed 14 out of 14 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| test/Azure.Functions.Sdk.Tests/Tasks/Extensions/WriteExtensionProjectTests.cs | Updates tests for new per-TFM project/hash outputs and adds multi-target coverage. |
| test/Azure.Functions.Sdk.Tests/Tasks/Extensions/ValidateExtensionPackagesTests.cs | Updates package creation to include TFMs; adds warnings/behavior tests for missing/different TFMs. |
| test/Azure.Functions.Sdk.Tests/Tasks/Extensions/ResolveExtensionPackagesTests.cs | Ensures resolved extension packages carry TFM metadata; adds multi-target scan test. |
| test/Azure.Functions.Sdk.Tests/ProjectCreatorExtensions.cs | Adds helper APIs for multi-target project creation and per-TFM extension project directory resolution. |
| test/Azure.Functions.Sdk.Tests/Integration/SdkEndToEndTests.Restore.cs | Expands restore E2E tests across TFMs and multi-target scenarios; centralizes generated project path logic. |
| test/Azure.Functions.Sdk.Tests/Integration/SdkEndToEndTests.Build.cs | Expands build E2E tests across TFMs and multi-target scenarios, including incremental checks. |
| src/Azure.Functions.Sdk/Tasks/Extensions/WriteExtensionProject.cs | Refactors task to write one extension project per TFM and include TFM in hashing. |
| src/Azure.Functions.Sdk/Tasks/Extensions/ValidateExtensionPackages.cs | Validates packages per TFM; warns and filters out packages missing TFM metadata. |
| src/Azure.Functions.Sdk/Tasks/Extensions/ResolveExtensionPackages.cs | Tags resolved extension packages with TFM metadata. |
| src/Azure.Functions.Sdk/TaskItemExtensions.cs | Adds strongly-typed accessor for TargetFramework item metadata. |
| src/Azure.Functions.Sdk/Targets/Extensions/Azure.Functions.Sdk.Extensions.targets | Updates targets to generate/restore per-TFM extension projects and markers; backfills assets path for multi-target. |
| src/Azure.Functions.Sdk/Targets/Extensions/Azure.Functions.Sdk.Extensions.props | Removes single-project path properties now replaced by per-TFM item metadata. |
| src/Azure.Functions.Sdk/Strings.resx | Adds warning string for missing extension package TFM metadata. |
| src/Azure.Functions.Sdk/LogMessage.cs | Registers new warning log message identifier. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
src/Azure.Functions.Sdk/Tasks/Extensions/ResolveExtensionPackages.cs
Outdated
Show resolved
Hide resolved
src/Azure.Functions.Sdk/Targets/Extensions/Azure.Functions.Sdk.Extensions.targets
Show resolved
Hide resolved
src/Azure.Functions.Sdk/Tasks/Extensions/WriteExtensionProject.cs
Outdated
Show resolved
Hide resolved
brettsam
approved these changes
Mar 12, 2026
# Conflicts: # src/Azure.Functions.Sdk/Targets/Extensions/Azure.Functions.Sdk.Extensions.targets # test/Azure.Functions.Sdk.Tests/Integration/SdkEndToEndTests.Build.cs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Issue describing the changes in this PR
resolves #3331
Pull request checklist
release_notes.mdAdditional information
This PR adds support for multi-targeted function apps. When a multi-targeted app is detected, an extension project will be generated and restored per TFM.
Important
Microsoft.NET.Sdk/10.0.200 includes NuGet 7.3, which introduces a new TFM alias concept. This concept may allow us to switch back to a single project, but multiple TFM aliases to create separate restore graphs. TFM Alias will not be fully supported until 10.0.300 though.