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

Update to .NET 6.0 #107

Closed
blowdart opened this issue Apr 19, 2022 · 3 comments
Closed

Update to .NET 6.0 #107

blowdart opened this issue Apr 19, 2022 · 3 comments
Assignees
Labels
breaking change Breaking change, requires major version bump status:in-progress Someone is working on implementation type:refactor Refactoring or improving of existing code version:major

Comments

@blowdart
Copy link

As .NET 6 is an LTS the countdown for 3.1's death started on its release.

After Dec 3, 2022 .NET 3.1 will no longer be supported or patched.

@JamieMagee JamieMagee added version:major status:in-progress Someone is working on implementation labels Apr 19, 2022
@JamieMagee
Copy link
Member

This work is in-progress in #76, but currently blocked by downstream projects. I'm working with downstream projects to figure out a timeline.

@blowdart mentioned there are some people on the dotnet team that could help get those projects up-to-date. I don't think we're at the stage where we need the assistance, but maybe in the near future, depending on what those projects reply.

@cobya cobya added status:blocked Issue is blocked by another issue or external requirement and removed status:in-progress Someone is working on implementation labels Jun 28, 2022
@cobya cobya added status:ready Ready to start implementation and removed status:blocked Issue is blocked by another issue or external requirement labels Jul 11, 2022
@cobya cobya pinned this issue Jul 11, 2022
@cobya
Copy link
Contributor

cobya commented Jul 11, 2022

The blocker our team had internally for this was resolved last week. @JamieMagee will hopefully be taking a look at this change later this week.

JamieMagee added a commit that referenced this issue Jul 12, 2022
Currently, we've been using [FxCop][1] to run code analysis and enforce some best practices. FxCop has been deprecated since around 2019. Similar code analysis has been ported to the .NET Roslyn Analyzers framework, in the `Microsoft.CodeAnalysis.FxCopAnalyzers` package, however that package is no longer required as of .NET 5.0 as the analyzers are included in the .NET SDK itself[^1]. As we are planning to upgrade to .NET 6.0 soon[^2] I am removing all reference to FxCop.

This change adds the `.editorconfig` from the .NET Boxed template[^3] that we have used as a reference for other parts of our project layout. I've not vetted every single rule that it enables, but it provides good defaults and is trusted and used widely.

Other changes to MSBuild configuration include:

- [`EnforceCodeStyleInBuild`][2] set to `true`
- [`AnalysisLevel`][3] set to `latest`
- [`AnalysisMode`][4] set to `AllEnabledByDefault`
- [`TreatWarningsAsErrors`] set to `false` (so these new code analysis changes wont break builds yet)

I plan to resolve some of the errors in followup PRs, but wanted to minimize the size of this one to enable easier review.

[1]: https://docs.microsoft.com/en-us/visualstudio/code-quality/net-analyzers-faq?view=vs-2022
[2]: https://docs.microsoft.com/en-us/dotnet/core/project-sdk/msbuild-props#enforcecodestyleinbuild
[3]: https://docs.microsoft.com/en-us/dotnet/core/project-sdk/msbuild-props#analysislevel
[4]: https://docs.microsoft.com/en-us/dotnet/core/project-sdk/msbuild-props#analysismode

[^1]: https://docs.microsoft.com/en-us/visualstudio/code-quality/migrate-from-fxcop-analyzers-to-net-analyzers?view=vs-2022
[^2]: #107
[^3]: https://github.com/Dotnet-Boxed/Templates/tree/main/Source/NuGetTemplate
@JamieMagee JamieMagee added status:in-progress Someone is working on implementation breaking change Breaking change, requires major version bump type:refactor Refactoring or improving of existing code and removed status:ready Ready to start implementation labels Oct 5, 2022
@JamieMagee
Copy link
Member

Resolved in #288

@JamieMagee JamieMagee unpinned this issue Oct 20, 2022
JamieMagee added a commit that referenced this issue Nov 2, 2022
After #107 and #162 we've migrated the target framework, and related dependencies, to .NET 6. However, the container image at the root of the repository was missed.

This PR:
- changes the base images to their `6.0-cbl-mariner2.0` tags
- Removes `gradle` from the final image (It doesn't appear to be available for Mariner 2.0)
- Removes trimming (Component Detection is incompatible with trimming due to our use of reflection)
- Makes a small linting fix in `DetectorProcessingService.cs` (IDE0055)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking change Breaking change, requires major version bump status:in-progress Someone is working on implementation type:refactor Refactoring or improving of existing code version:major
Projects
None yet
Development

No branches or pull requests

4 participants