Skip to content
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

.Net: dotnet format issues with SDK 9.0 #10741

Merged

Conversation

ross-p-smith
Copy link
Contributor

@ross-p-smith ross-p-smith commented Feb 28, 2025

Motivation and Context

In order to be able to build the dotnet code with version 9 SDK, there were some problems with the following file

/workspaces/semantic-kernel/dotnet/src/InternalUtilities/src/Diagnostics/ActivityExtensions.cs. This had a BOM encoding problem which was causing dotnet format to fail. As seen in this Issue dotnet/sdk#46780.

I fixed the encoding and formatting issues ready for version 9. Most of the formatting issues are around removing the access modifiers on interface members

This relates to #10715

Description

Contribution Checklist

@ross-p-smith ross-p-smith requested a review from a team as a code owner February 28, 2025 23:39
@markwallace-microsoft markwallace-microsoft added .NET Issue or Pull requests regarding .NET code kernel Issues or pull requests impacting the core kernel kernel.core memory labels Feb 28, 2025
@github-actions github-actions bot changed the title dotnet format issues with SDK 9.0 .Net: dotnet format issues with SDK 9.0 Feb 28, 2025
@ross-p-smith ross-p-smith force-pushed the ross/dotnet9_build_fixes branch from eec70a8 to 4895399 Compare March 3, 2025 14:00
@RogerBarreto RogerBarreto requested a review from westey-m March 3, 2025 16:13
@markwallace-microsoft markwallace-microsoft added this pull request to the merge queue Mar 4, 2025
Merged via the queue into microsoft:main with commit 022f05e Mar 4, 2025
19 checks passed
@ross-p-smith ross-p-smith deleted the ross/dotnet9_build_fixes branch March 5, 2025 09:28
rracanicci pushed a commit to rracanicci/semantic-kernel that referenced this pull request Mar 5, 2025
### Motivation and Context
In order to be able to build the dotnet code with version 9 SDK, there
were some problems with the following file


`/workspaces/semantic-kernel/dotnet/src/InternalUtilities/src/Diagnostics/ActivityExtensions.cs`.
This had a BOM encoding problem which was causing `dotnet format` to
fail. As seen in this Issue
[https://github.com/dotnet/sdk/issues/46780](https://github.com/dotnet/sdk/issues/46780).

I fixed the encoding and formatting issues ready for version 9. Most of
the formatting issues are around removing the access modifiers on
interface members

This relates to microsoft#10715
### Description

<!-- Describe your changes, the overall approach, the underlying design.
These notes will help understanding how your code works. Thanks! -->

### Contribution Checklist

<!-- Before submitting this PR, please make sure: -->

- [x] The code builds clean without any errors or warnings
- [ ] The PR follows the [SK Contribution
Guidelines](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md)
and the [pre-submission formatting
script](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md#development-scripts)
raises no violations
- [ ] All unit tests pass, and I have added new tests where possible
- [ ] I didn't break anyone 😄
github-merge-queue bot pushed a commit that referenced this pull request Mar 7, 2025
### Motivation and Context

In sdk9, there is a bug fix to one of the analyzers:
[https://github.com/dotnet/msbuild/issues/11426](https://github.com/dotnet/msbuild/issues/11426).
This causes the code base to fail in the `dotnet format` stage when
built on sdk9.

This PR fixes the file that has been changed this week and adds a
configuration into the build to format using sdk9.0 so that the build
fails if more are introduced.

- [x] The code builds clean without any errors or warnings
- [ ] The PR follows the [SK Contribution
Guidelines](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md)
and the [pre-submission formatting
script](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md#development-scripts)
raises no violations
- [ ] All unit tests pass, and I have added new tests where possible
- [ ] I didn't break anyone 😄

This relates to #10716 and was previously fixed in #10741
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kernel.core kernel Issues or pull requests impacting the core kernel memory .NET Issue or Pull requests regarding .NET code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants