Removed support for .Net Framework 4.6#25
Conversation
Upgraded test & benchmark projekt to .net 6.0 Upgraded NuGet packages. Updated CsvHelper benchmark code to the new CsvHelper version
| var record = reader.Context.Record; | ||
| for (int i = 0; i < record.Length; i++) | ||
| s = record[i]; | ||
| IDictionary<string,Object> record = (IDictionary<string, Object>)reader.GetRecord<dynamic>(); |
There was a problem hiding this comment.
Isn't there a more elegant (and faster) way to read values from the record?
There was a problem hiding this comment.
Sorry, I´m not used to the CsvHelper library. I just tried to make the code working. Should I downgrade the CsvHelper nuget package to the old version, so that the original code is working again?
There was a problem hiding this comment.
Looking at CsvHelper Reader class source, I think new code should be (did not test it)
while (reader.Read())
{
for (int i = 0; i < reader.ColumnCount; i++)
s = reader[i];
}
There was a problem hiding this comment.
Yes, it´s working with this code.
src/NLight/NLight.csproj
Outdated
| <PackageReleaseNotes>Added multi-targeting support for .NET 4.6</PackageReleaseNotes> | ||
| <SignAssembly>true</SignAssembly> | ||
| <AssemblyOriginatorKeyFile>C:\projects\oss\nlight\src\NLight.snk</AssemblyOriginatorKeyFile> | ||
| <PackageReleaseNotes>Increased compatibility to newer .net versions. Removed support for .NET 4.6</PackageReleaseNotes> |
There was a problem hiding this comment.
Please state minimal supported version (.NET 6)
There was a problem hiding this comment.
With netstandard2.0 and System.Reactive.Core.5.0.0 we can keep the library backwards compatible to Framework 4.7.2.
| <PropertyGroup> | ||
| <TargetFrameworks>netstandard2.0;net46</TargetFrameworks> | ||
| <Version>2.1.1</Version> | ||
| <TargetFrameworks>netstandard2.0</TargetFrameworks> |
There was a problem hiding this comment.
Would it make sense to target .NET 6 here as well?
There was a problem hiding this comment.
I kept the settings to netstandard, so people who are still using classic .net framework are still able to use this library.
src/NLight/NLight.csproj
Outdated
| <SignAssembly>true</SignAssembly> | ||
| <AssemblyOriginatorKeyFile>C:\projects\oss\nlight\src\NLight.snk</AssemblyOriginatorKeyFile> | ||
| <PackageReleaseNotes>Increased compatibility to newer .net versions. Removed support for .NET 4.6</PackageReleaseNotes> | ||
| <!--<SignAssembly>true</SignAssembly> |
There was a problem hiding this comment.
Please uncomment. I will publish to Nuget once PR merged
|
Hello, thank you for this PR, very much appreciated and I'm glad that my library is still being used after all those years ;-) |
|
Based on your comments in the code, I am not sure I understand what is the minimum change required to remove package downgrade warning when using .NET 6? Taking a step back, it would probably make sense to refresh the library by targeting .NET 6 since it merges netcoreapp and netstandard. |
I had the following downgrade warning with the old library during publish:
Upgrading the library to System.Reactive.Core 5.0.0 solved this problem. But 5.0.0 is not longer compatible with net4.6, so I removed this target framework. But it is compatible with netstandard 2.0 and can also be used in old .net 4.7.2. projekts (System.Reactive.Core is also compatible to 4.7.2, according to the information on the nuget page for this package) I wanted to make sure, that the library keeps compatible to as many projects as possible, and people "stucked" to classic framework can still use this library. I could also fix it by manually adding System.IO.FileSystem 4.3.0 to MyProject, but I think it is much easier, when it work´s out of the box. |
src/NLight/NLight.csproj
Outdated
| <PackageProjectUrl>https://github.com/slorion/nlight</PackageProjectUrl> | ||
| <PackageTags>io,parser,csv,delimited,transaction,reactive,tree</PackageTags> | ||
| <PackageReleaseNotes>Added multi-targeting support for .NET 4.6</PackageReleaseNotes> | ||
| <PackageReleaseNotes>Increased compatibility to newer .net versions. Minimum supported .NET Version is 4.7.2 (.NET Standard 2.0)</PackageReleaseNotes> |
There was a problem hiding this comment.
Could you change to "Increased compatibility with newer .NET versions. Updated Reactive dependency to 5.0. NLight targets .NET Standard 2.0 (.NET Framework 4.6.1+, .NET Core 2.0+)."
See https://learn.microsoft.com/en-us/dotnet/standard/net-standard?tabs=net-standard-2-0#net-5-and-net-standard for compatibility matrix.
|
Thanks, I get it now. I will just have a quick look how to update the benchmark code for CsvHelper to avoid using |
…void using dynamic.
|
Thank you for update, I will be able to have final look and merge next week. |
|
Hi, do i need to do anything else? Or can the code be merged? |
|
Sorry for delay, I had to prioritize work, but hopefully will get around this by end of June. |
Removed support for .Net Framework 4.6
Upgraded test & benchmark projekt to .net 6.0
Upgraded NuGet packages. Updated CsvHelper benchmark code to the new CsvHelper version
(These changes fixed package downgrade warnings and publish issues with a newer .net 6.0 / EF. Core 7.0 application)