Skip to content

Conversation

Romfos
Copy link

@Romfos Romfos commented Nov 10, 2024

Changes:

  • Reduce amount of target frameworks: .NET 8 + .NET Standard 2.0
  • Remove Microsoft.SourceLink.GitHub nuget. This is included in .NET 8 sdk, no need to use this package
  • Added .NET 9 to test matrix

Motivation:

@Romfos Romfos changed the title Reduce amount of target frameworks Reduce amount of target frameworks and add .NET 9 to test matrix Nov 12, 2024
@Romfos
Copy link
Author

Romfos commented Dec 22, 2024

please, help with review @JoshClose

@JoshClose
Copy link
Owner

I've seen some weird issues with nuget choosing the wrong framework and other odd stuff. That is why I have been building every version

@Romfos
Copy link
Author

Romfos commented Jun 1, 2025

I've seen some weird issues with nuget choosing the wrong framework and other odd stuff. That is why I have been building every version

Maybe you have some example?
If we will have only .NET Standard version for older frameworks - you actually will have single version without variations

@Rob-Hague
Copy link
Contributor

Related to #2324 (comment)?

@Rob-Hague
Copy link
Contributor

BTW net462 is not fully compatible with netstandard2.0 (despite some documentation). I would recommend keeping a net462 target.

For example, if you put this in a netstandard2.0 library:

    public class Class1
    {
        public static string Go()
        {
            ECDsa ecdsa = ECDsa.Create(ECCurve.NamedCurves.brainpoolP256r1);

            return Convert.ToBase64String(ecdsa.ExportParameters(true).D);
        }
    }

and call it from a net462 app:

using ClassLibrary1;

Console.WriteLine(Class1.Go());

Console.ReadLine();

It will build but get a runtime error. (System.TypeLoadException: 'Could not load type 'NamedCurves' from assembly 'netstandard, Version=2.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51'.')

@Romfos
Copy link
Author

Romfos commented Jun 1, 2025

@Rob-Hague as far as I know - CsvHelper doesn't use any API that is not compatible with NET FX. I think that compatibility is not an issue for this library. Or am i wrong?

List of test platforms in tests: net9.0;net8.0;net48;net47;net462

#2324 (comment)
System.Runtime.CompilerServices.Unsafe update fix this issue

@JoshClose
Copy link
Owner

I'm going to continue to publish a build for each available framework. I read up on this a little and the compiler can use optimizations for each framework and other things.

@JoshClose JoshClose closed this Jun 2, 2025
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 this pull request may close these issues.

3 participants