Skip to content

Add .NET Standard 2.0 target#97

Open
RichardD2 wants to merge 7 commits intoleandromoh:masterfrom
RichardD2:master
Open

Add .NET Standard 2.0 target#97
RichardD2 wants to merge 7 commits intoleandromoh:masterfrom
RichardD2:master

Conversation

@RichardD2
Copy link

With a touch of PolySharp and a few shim methods, it's possible to get this library working in .NET Standard 2.0, and hence .NET Framework 4.x.

@leandromoh
Copy link
Owner

Hi @RichardD2 !

I did not take a look in the PR changes yet, but thank you for your contribution!

I am unfamiliarized with PolySharp, so I need to take a look at it too.

A question: did you need to use the library in a project targeting < .NET Standard 2.1 ? if so, I would like to know the scenario.

@RichardD2
Copy link
Author

@leandromoh I haven't used it yet, but it certainly looks interesting for some of our projects that need to parse flat files.

We're largely stuck with .NET Framework because we need to support SQL Server Reporting Services. Microsoft seem to have given up on providing a .NET library for it, and I've not yet had a chance to evaluate the few third-party SSRS libraries I've found. :)

@leandromoh
Copy link
Owner

leandromoh commented Dec 19, 2023

@leandromoh I haven't used it yet, but it certainly looks interesting for some of our projects that need to parse flat files.

@RichardD2 glad to know that 😁

We're largely stuck with .NET Framework because we need to support SQL Server Reporting Services. Microsoft seem to have given up on providing a .NET library for it, and I've not yet had a chance to evaluate the few third-party SSRS libraries I've found. :)

thank you for the context, it is valuable to know the scenarios where the lib might be useful and user limitations. this kind of input help to reason about architecture decisions.

CI had some problems when running unit tests for dotnet framework.
Look releated to microsoft/vstest#2469 or this
Could you please take a look?

@RichardD2
Copy link
Author

I've updated the xUnit references to the latest version, since the ticket you linked to suggests this was fixed in 2.5.3, and the project was still referencing 2.4.

@leandromoh
Copy link
Owner

leandromoh commented Dec 19, 2023

Looks that problem was solved and now a test is failing for dotnet framework 472

image

@RichardD2
Copy link
Author

Looks like something is trying to read the internal IsTransient property on the Exception, and that's throwing a NotImplementedException.

Which is strange, since that doesn't happen when I run that test directly in VS2022 on Windows.

Perhaps it's a Mono issue? Is it worth trying the tests on a Windows image instead?

@RichardD2
Copy link
Author

I managed to get the tests running on my local WSL2 Ubuntu instance, and reproduced the problem.

It looks like that error was caused by FluentAssertions; after upgrading to the latest version, that error went away.

The only other problem I encountered was with new-lines. Environment.NewLine returns \r\n on Windows, but not on Linux. Replacing the references in the tests with \r\n allowed them to pass.

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.

2 participants

Comments