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

Target netstandard2.0 instead of net46 #6028

Closed
pavel-mikula-sonarsource opened this issue Aug 23, 2022 · 8 comments · Fixed by #7028
Closed

Target netstandard2.0 instead of net46 #6028

pavel-mikula-sonarsource opened this issue Aug 23, 2022 · 8 comments · Fixed by #7028
Assignees
Milestone

Comments

@pavel-mikula-sonarsource
Copy link
Contributor

pavel-mikula-sonarsource commented Aug 23, 2022

Context

#2961 introduced netstandard2.0 targetting to ensure that we also run cross platform
#5976 removed netstandard2.0 targetting from CI run and let it only locally for CI performance reasons and unit testring

Description

We need to either:

  • drop net46 support and target only netstandard2.0
  • add parallel CI step to build netstandard2.0
  • Update the documentation
@pavel-mikula-sonarsource pavel-mikula-sonarsource added the Type: Tooling Tools make us productive. label Aug 23, 2022
@andrei-epure-sonarsource
Copy link
Contributor

@pavel-mikula-sonarsource
Copy link
Contributor Author

This doc recommends 4.7.2 to be sure
https://github.com/dotnet/standard/blob/v2.1.0/docs/versions.md

The versions listed here represent the rules that NuGet uses to determine whether a given .NET Standard library is applicable. While NuGet considers .NET Framework 4.6.1 as supporting .NET Standard 1.5 through 2.0, there are several issues with consuming .NET Standard libraries that were built for those versions from .NET Framework 4.6.1 projects. For .NET Framework projects that need to use such libraries, we recommend that you upgrade the project to target .NET Framework 4.7.2 or higher.

@andrei-epure-sonarsource
Copy link
Contributor

Discussion from LTS planning: 4.6.2 is the lowest supported by Microsoft, so it would be easier to move to 4.6.2

@pavel-mikula-sonarsource
Copy link
Contributor Author

We've decided to deprecate net46 support before 9.x LTS.

We will drop it in SQ 10.1 - 2nd release after LTS

@pavel-mikula-sonarsource pavel-mikula-sonarsource added Type: Improvement and removed Type: Tooling Tools make us productive. labels Sep 2, 2022
@Evangelink
Copy link
Contributor

FYI: I confirm that netstandard2.0 is the current recommendation for analyzers and code generators. This is what we use on roslyn analyzers.

This will indeed drop support for net46 but as stated by @andrei-epure-sonarsource, net462 is now the oldest supported version.

@pavel-mikula-sonarsource pavel-mikula-sonarsource changed the title Solve netstandard2.0 targetting Target netstandard2.0 instead of net46 Sep 5, 2022
@pavel-mikula-sonarsource
Copy link
Contributor Author

ToDo: Update SymbolicExecution/Roslyn/OperationProcessors/Invocation/ProcessLinqEnumerableAndQueryable to use nameof for the other members

@pavel-mikula-sonarsource
Copy link
Contributor Author

Deprecation of net46 analysis environment was announced here:
https://community.sonarsource.com/t/dropping-support-for-build-environments-with-net-framework-4-62/76528

@pavel-mikula-sonarsource
Copy link
Contributor Author

There's a PR ready, but it's blocked due to the Roslyn bug dotnet/roslyn#67211 for now.

It should get fixed after VS 17.5 servicing release. VS 17.5.3 has MsBuild 17.5.1 and that is not enough.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants