-
Notifications
You must be signed in to change notification settings - Fork 30
Update target frameworks #22
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: master
Are you sure you want to change the base?
Conversation
|
Thanks for the initiative, but the target frameworks have been carefully chosen. netstandard1.3 is the newest target that is supported for UAP apps (deprecated but still in use by many). I'm not aware of any benefits in targeting net8.0, net9.0 when the code doesn't take advantage of any of the apis exclusive to those targets; the netstandard2.1 target would be compiled and uploaded to nuget using the latest version of the sdk and should see the same codegen benefits that a net9.0 target would, if I'm not mistaken. |
|
I tried to test your library and I am getting errors due to transitive vulnerabilities, I presume because of the dependency on netstandard1.3 which is out of support: |
|
|
||
| <PropertyGroup> | ||
| <TargetFrameworks>netstandard1.3;netstandard2.1</TargetFrameworks> | ||
| <TargetFrameworks>netstandard2.0;netstandard2.1;net8.0;net9.0</TargetFrameworks> |
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.
Is there any upside to having net8.0 and net9.0 targets? I wouldn't expect there to be given there are no code changes here to use newer features.
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.
In this case, because there are no dependencies and no conditional compilation, probably not much benefit, but not much drawback either except for a larger nupkg file. I can remove them if you like.
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.
Also slower builds when working in the repo, as internally MSBuild invokes itself for all target frameworks.
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.
Also slower builds when working in the repo, as internally MSBuild invokes itself for all target frameworks.
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.
As a sidenote, the transitive vulnerabilities happen only because I build my test project also for .NET Framework. The best fix were to have a net462 build target.
I think there is a misperception regarding netstandardx.x These were API definition so technically there is no end of life. Problem starts only when .NET Framework starts to pull in netstandard1.x/2.0 libraries, I guess using a compatibility layer.
Visual Studio/nuget/dotnet/etc don't look at the netstandard1.3 target unless that is the most recent version of the api that your target framework supports. I believe there is some misunderstanding here. |
|
@mqudsi I don't know about whether the test packages have vulnerabilities for .NET Framework, but it could arise if there are packages that are built for .NET Standard 1.3 in certain versions but in later versions only support a minimum of .NET Standard 2.0. If my pull request will not be accepted as-is then I suggest the following targets:
|
Changes the target frameworks from (
netstandard1.3,netstandard2.1) to (netstandard2.0,netstandard2.1,net8.0,net9.0).Targeting
netstandard1.3is no longer recommended by Microsoft since the frameworks compatible withnetstandard1.3but not bynetstandard2.0are long out-of-support.Targeting
net8.0andnet9.0should give performance benefits.Also updates the test project packages.