Updated .NET Framework target from 4.0 to 4.6.2 #256
Updated .NET Framework target from 4.0 to 4.6.2 #256foonix wants to merge 2 commits intoDiscUtils:developfrom
Conversation
|
@foonix I don't believe there's any reason to target net462 explicitly when netstandard2.0 is also targeted. According to my reading, and to some experimentation I'm doing right now, I believe it's now sufficient to target only netstandard2.0 in class libraries, since older framework version are out of support. |
|
In most cases this is true. However, there are a few things in .NET Framework 4.6.2 that are not in .NET Standard 2.0 that sometimes make the implementation easier and more efficient when targeting 4.6.2 explicitly instead of standard. |
|
I'll have to take your word for it. I'm working on a similar PR, but I've gone a bit further and bumped several projects up to NET7.0. Do you think there's reason to explicitly target NET7.0 in a library? Is there any reason to still target NET5.0? |
|
I would say no to 5 but also stick with 6 since it's a long term support release. |
|
I usually target .NET 6 and .NET 7 for libraries these days. .NET 6 is a long term service version and lots of project will stay on that version for some time. .NET 7 has several optimizations for both memory and speed, so it is good to have that as an explicit target as well even when no code explicitly use .NET 7-specific API. |
4.6.1 and older are EOL as of 20220426.
This caused build problems in VS 2022.