-
Notifications
You must be signed in to change notification settings - Fork 200
[MSBUILD SDK] Error out build if incompatible SDK is present #3296
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 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
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.