[MSBUILD SDK] Add warning for building generated project in Azure.Functions.Sdk#3347
Merged
jviau merged 4 commits intofeature/msbuild-sdkfrom Mar 17, 2026
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR makes two changes to the Azure Functions SDK build tooling: (1) it adds a Build target override in the inner generated project (azure_functions.g.csproj) that emits a warning if the project is accidentally built directly, and (2) it promotes the extension package target framework validation from a warning to an error. New documentation for rules AZFW0109 and AZFW0110 is included, along with corresponding test updates.
Changes:
- Override the
Buildtarget in the inner generated project to emit warning AZFW0110 instead of performing a real build. - Escalate the missing-target-framework validation (AZFW0109) from warning to error, returning
falsefrom the task. - Add documentation for AZFW0109 and AZFW0110, plus integration/unit test updates.
Reviewed changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
src/Azure.Functions.Sdk/Targets/Inner/Azure.Functions.Sdk.Inner.targets |
Adds FuncSdkLog UsingTask and overrides Build target to emit a warning |
src/Azure.Functions.Sdk/Tasks/Extensions/ValidateExtensionPackages.cs |
Changes TFM-missing log from warning to error and returns false |
src/Azure.Functions.Sdk/LogMessage.cs |
Renames warning to error for AZFW0109, adds new AZFW0110 warning message |
src/Azure.Functions.Sdk/Strings.resx |
Renames AZFW0109 resource, adds AZFW0110 resource string |
docs/sdk-rules/AZFW0108.md |
Removes extra blank line |
docs/sdk-rules/AZFW0109.md |
New documentation for AZFW0109 error rule |
docs/sdk-rules/AZFW0110.md |
New documentation for AZFW0110 warning rule |
test/.../ValidateExtensionPackagesTests.cs |
Updates test to expect error instead of warning |
test/.../SdkEndToEndTests.Targets.InnerBuild.cs |
New integration test for inner build warning |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
b77f3ca to
17afb92
Compare
fabiocav
reviewed
Mar 13, 2026
liliankasem
approved these changes
Mar 17, 2026
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 #issue_for_this_pr
Pull request checklist
release_notes.mdAdditional information