Skip to content

Conversation

@jviau
Copy link
Contributor

@jviau jviau commented Dec 15, 2025

Issue describing the changes in this PR

resolves #3134

Pull request checklist

  • My changes do not require documentation changes
    • Otherwise: Documentation issue linked to PR
  • My changes should not be added to the release notes for the next release
    • Otherwise: I've added my notes to release_notes.md
  • My changes do not need to be backported to a previous version
    • Otherwise: Backport tracked by issue/PR #issue_or_pr
  • I have added all required tests (Unit tests, E2E tests)

Additional information

This PR adds msbuild targets to collect the extension bundle files from the generated project. A major difference from the current SDK is that we no longer fully build the generated project, we just collect extension files and then directly copy them to .azurefunctions output folder. This saves us many redundant files copying and cuts down on build time.

Copilot AI review requested due to automatic review settings December 15, 2025 20:23
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR implements collection of extension bundle files from a generated project and copies them directly to the .azurefunctions output folder, eliminating the need to fully build the generated project. This optimization reduces redundant file copying and improves build performance.

Key changes:

  • Added MSBuild targets to collect extension files and copy them to .azurefunctions folder
  • Implemented filtering logic to exclude runtime assemblies/packages from the extensions payload
  • Added comprehensive test coverage for extension file collection scenarios

Reviewed changes

Copilot reviewed 10 out of 10 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
test/Azure.Functions.Sdk.Tests/Integration/SdkEndToEndTests.Targets.WorkerConfig.cs Removed extraneous blank line
test/Azure.Functions.Sdk.Tests/Integration/SdkEndToEndTests.Targets.GetFunctionsExtensionFiles.cs Added tests for the GetFunctionsExtensionFiles target with and without package references
test/Azure.Functions.Sdk.Tests/Integration/SdkEndToEndTests.Build.cs Added tests for building with extensions and validation of extensions payload
test/Azure.Functions.Sdk.Tests/Assertions/TaskItemAssertions.cs Added HaveMetadataLike assertion method for pattern matching metadata values
src/Azure.Functions.Sdk/Tasks/Inner/ResolveExtensionCopyLocal.cs Implemented task to resolve and filter extension assemblies for the payload
src/Azure.Functions.Sdk/TaskItemExtensions.cs Added NuGetPackageId property and TryGetNuGetPackageId method
src/Azure.Functions.Sdk/Targets/Inner/Azure.Functions.Sdk.Inner.targets Added ResolveFunctionsExtensionFiles target and ResolveExtensionCopyLocal task
src/Azure.Functions.Sdk/Targets/Inner/Azure.Functions.Sdk.Inner.props Added import for runtime packages properties file
src/Azure.Functions.Sdk/Targets/Inner/Azure.Functions.Sdk.Inner.RuntimePackages.props Defined runtime assemblies and packages to exclude from extensions payload
src/Azure.Functions.Sdk/Targets/Extensions/Azure.Functions.Sdk.Extensions.targets Added targets to prepare and publish extension payload, and GetFunctionsExtensionFiles target

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@jviau jviau force-pushed the jviau/msbuild-sdk/collect-extensions branch from c2ead76 to c1af333 Compare December 16, 2025 23:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants