-
Notifications
You must be signed in to change notification settings - Fork 201
[MSBUILD SDK] Migrate SDK to C#14 extension syntax #3262
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
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 migrates the Azure.Functions.Sdk MSBuild project to use C# 14's new extension syntax, which allows extension methods to be defined more intuitively within extension blocks rather than as static methods in static classes.
Key changes:
- Refactored extension methods from traditional static syntax to C# 14
extension(Type)blocks - Consolidated helper methods (e.g.,
Readmethods inLockFileExtensions) that were previously scattered - Removed unused test utility method (
WriteNugetConfig)
Reviewed Changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 9 comments.
Show a summary per file
| File | Description |
|---|---|
| MSBuildExtensions.cs | Converted static extension methods to C# 14 extension syntax for ProjectCreatorTemplates and ProjectCreator |
| MSBuildLogExtensions.cs | Converted static extension methods to C# 14 extension syntax for TaskLoggingHelper with private helper methods |
| TaskItemExtensions.cs | Converted static extension methods to C# 14 extension syntax for ITaskItem |
| LockFileExtensions.cs | Converted to C# 14 extension syntax and added new static helper methods for reading lock files |
| ExceptionExtensions.cs | Converted static extension methods to C# 14 extension syntax for Exception |
| ResolveExtensionPackages.cs | Updated to use new LockFile.Read helper method |
| TempDirectory.cs | Removed unused WriteNugetConfig method |
| ResolveExtensionPackagesTests.cs | Removed call to deleted WriteNugetConfig method |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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
Copilot reviewed 15 out of 15 changed files in this pull request and generated 5 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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
Copilot reviewed 15 out of 15 changed files in this pull request and generated 5 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
test/Azure.Functions.Sdk.Tests/Tasks/Extensions/ResolveExtensionPackagesTests.cs
Show resolved
Hide resolved
test/Azure.Functions.Sdk.Tests/Integration/SdkEndToEndTests.Targets.CollectExtensionPackages.cs
Show resolved
Hide resolved
test/Azure.Functions.Sdk.Tests/Integration/SdkEndToEndTests.Properties.cs
Show resolved
Hide resolved
# Conflicts: # test/Azure.Functions.Sdk.Tests/ProjectCreatorExtensions.cs
Issue describing the changes in this PR
resolves #issue_for_this_pr
Pull request checklist
release_notes.mdAdditional information
Migrates
Azure.Functions.Sdkto use the new C#14 extensions syntax.https://devblogs.microsoft.com/dotnet/csharp-exploring-extension-members/