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
Libraries that target netstandard2.0 not compatible with NUnit v4.0 #4568
Comments
Thank you for getting in touch! NUnit 4 can test any library that targets netstandard 2.0 and 2.1. It is the test projects itself that needs to target anything above netframework 4.6.2 or .net 6.0. So this should not be a blocker for any library. I am sure you know, but for anyone else reading this: Note that NUnit (and any other testframework) must target something that can be executed, a platform. Netstandard is not intended for that, and must be run in the context of something that can, .net framework or .net core.
The reason for the change is that we need to reduce the number of supported frameworks. The code was getting too tangled up in #ifdefs, and we could not any longer take advantage of new features in dotnet going forward. We were also struggling with differences in how processes are handled. It became a blocker for going forward. So we needed to make a choice here.
No, it is not possible. We are past that line now. If we try, it will probably break. We're following, but lagging, the Microsoft support lifecycle. Note that we will still release upgrades for the NUnit 3.X series, which will continue to support the older frameworks. We will backport essential issues to that series. Issues that will be backported will be marked with the label About the decisions, see #4424 , #3070, #4419 and this comment: #4419 (comment) . I don't think we have been aware of the FsUnit project. It would be nice to set up some channels for maintainers that could speed up communication and also make sure breaking changes are discussed with the maintainers before we act on them. We do have the slack account https://nunit.slack.com (Invite here: https://join.slack.com/t/nunit/shared_invite/zt-287bueokg-vivjHORhFp4AkyHPx7TQ9g) . We could also set up something else, open for suggestions. |
Thank you for the quick response. I understand and appreciate your work. I assume - when I upgrade to NUnit v4 - that setting the target frameworks to I know phasing out It's a bit harsh cutting out I'll have a look and make a plan supporting NUnit 3.X and v4 and testing out the upgrades. |
Why would that be? They can still test netstandard. Do their implementation embed the NUnit framework? Do you have some links to these? |
Not so sure it is. Looking at this post https://devblogs.microsoft.com/dotnet/the-future-of-net-standard/ the .net 5.0 and upwards are essentially .net Standard vNext. |
Thank you for clarification, @OsirisTerje.
I did not find any packages or projects those embed NUnit, but that would apply to all testing frameworks that are based on NUnit. |
Thank you for developing |
Hey, I'm maintainer of FsUnit and I'm currently trying to upgrade to NUnit v4.0.
I realized that NUnit now targets only .NET Framework 4.6.2 & .NET 6.0, the FsUnit nuget package which wraps NUnit targets among others
netstandard2.0
for a broad compatibility.Now, there is a huge problem for all users that have .NETStandard in their projects or people that ship libraries to their community.
So, NUnit v4.0 is currently not usable for a lot of users.
I saw that these changes were made here:
https://github.com/nunit/nunit/pull/4430/files#diff-213f730230234cb4b8fde7db80cdfd395d64c9f2e1c26385d00a6e185f1572bd
Why has this been done? Are there any compatibility issues with
netstandard2.0
? Willnetstandard2.0
comes back in a fix?PS:
netstandard2.0
cover a lot of supported frameworks for now, see here: https://learn.microsoft.com/en-us/dotnet/standard/net-standard?tabs=net-standard-2-0Thank you
The text was updated successfully, but these errors were encountered: