[MSBUILD SDK] Error out build if incompatible SDK is present#3296
Merged
jviau merged 6 commits intofeature/msbuild-sdkfrom Jan 22, 2026
Merged
[MSBUILD SDK] Error out build if incompatible SDK is present#3296jviau merged 6 commits intofeature/msbuild-sdkfrom
jviau merged 6 commits intofeature/msbuild-sdkfrom
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR expands the SDK validation to detect and error out when incompatible SDK packages are referenced in a project. The validation is generalized from checking only the legacy in-proc SDK to checking both Microsoft.NET.Sdk.Functions and Microsoft.Azure.Functions.Worker.Sdk.
Changes:
- Renamed the validation target and error message to reflect that it now checks for multiple incompatible SDKs, not just the legacy one
- Updated the MSBuild target to check
PackageReferenceitems instead of a build property - Added test coverage for both incompatible SDK packages during restore
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
src/Azure.Functions.Sdk/Targets/Azure.Functions.Sdk.targets |
Renamed target from _FunctionAppValidation to _CheckForConflictingFunctionSdk, updated to check PackageReference items for both incompatible SDKs |
src/Azure.Functions.Sdk/Strings.resx |
Renamed error message resource and updated text to be parameterized for different package names |
src/Azure.Functions.Sdk/LogMessage.cs |
Renamed constant from Error_UsingLegacyFunctionsSdk to Error_UsingIncompatibleSdk and updated FromId mapping |
test/Azure.Functions.Sdk.Tests/Integration/SdkEndToEndTests.Restore.cs |
Added parameterized test to verify both incompatible SDKs are detected during restore |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
458ac3a to
0a915c9
Compare
0a915c9 to
77b3704
Compare
RohitRanjanMS
approved these changes
Jan 21, 2026
RohitRanjanMS
approved these changes
Jan 22, 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
This PR expands a build/restore target to also error out if
Microsoft.Azure.Functions.Worker.Sdkis being used in the new MSBuild sdk.