-
Notifications
You must be signed in to change notification settings - Fork 201
[MSBUILD SDK] Collect extension files into .azurefunctions output folder #3277
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: feature/msbuild-sdk
Are you sure you want to change the base?
Conversation
There was a problem hiding this 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
.azurefunctionsfolder - 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.
src/Azure.Functions.Sdk/Targets/Inner/Azure.Functions.Sdk.Inner.RuntimePackages.props
Outdated
Show resolved
Hide resolved
…r.RuntimePackages.props Co-authored-by: Copilot <[email protected]>
….com/Azure/azure-functions-dotnet-worker into jviau/msbuild-sdk/collect-extensions
c2ead76 to
c1af333
Compare
Issue describing the changes in this PR
resolves #3134
Pull request checklist
release_notes.mdAdditional 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
.azurefunctionsoutput folder. This saves us many redundant files copying and cuts down on build time.