FsUnit
FsUnit copied to clipboard
Cannot upgrade to 6.0.0 when using .NET Framework 4.8
Description
I was trying to update my solution with the latest nuget packages and it would not allow upgrading FsUnit from 5.6.1 to 6.0.0 due to the following error:
NU1202: Package FsUnit 6.0.0 is not compatible with net48 (.NETFramework,Version=v4.8). Package FsUnit 6.0.0 supports: net6.0 (.NETCoreApp,Version=v6.0)
NU1202: Package FsUnit 6.0.0 is not compatible with net48 (.NETFramework,Version=v4.8) / win7-x86. Package FsUnit 6.0.0 supports: net6.0 (.NETCoreApp,Version=v6.0)
Repro steps
Please provide the steps required to reproduce the problem
- Create a solution/project relying on .NET 4.8 and try to add the FsUnit 6.0.0 package
Expected behavior
It should hopefully be compatible with .NET Framework 4.8.
Actual behavior
NU1202: Package FsUnit 6.0.0 is not compatible with net48 (.NETFramework,Version=v4.8). Package FsUnit 6.0.0 supports: net6.0 (.NETCoreApp,Version=v6.0)
NU1202: Package FsUnit 6.0.0 is not compatible with net48 (.NETFramework,Version=v4.8) / win7-x86. Package FsUnit 6.0.0 supports: net6.0 (.NETCoreApp,Version=v6.0)
Known workarounds
Stay at version 5.6.1.
Related information
- Operating system: Windows
- Branch: from Nuget
- .NET Runtime, CoreCLR or Mono Version: .NET Framework 4.8 with Visual Studio
- Performance information, links to performance testing scripts: N/A
Hey @manu-st, thank you for reaching out.
FsUnit 6.0.0 has the dependency NUnit version >= 4.0.0 included.
Since NUnit v4
there is no compatibility with netstandard 2.0
anymore. We took the step to drop this target framework, too.
Another workaround would be to migrate either to net6.0
or the FsUnit.xUnit nuget package
.
I hope I could help. 🙂
.NUnit may have dropped .netstandard, but still supports .NET Framework:
And this is what I'm using without any problem in my project. Anyway you could add the .NET Framework 4.6.2 minimum requirement as well?
We decided for FsUnit to not target .NET Framework because there is no really need for it. You're the 1st who complains this.
There are quite a few of us who do not have the luxury to update to the non-.NET Framework and since .NUnit works just fine there, why not FsUnit too? I do not know if there are fundamental incompatibilities but if it compiles, it should work.
I'm doing my best.
Yes, it is technically possible to support .NET Framework, but we decided to target the latest LTS to simplify project maintenance, embrace new features and improvements as soon as possible, and keep the code base modern.
Soon we will drop support for net6
and target net8
(most likely around November, with the end-of-life of .net 6)
If you need to keep all dependencies updated and still stay on the .NET Framework and FsUnit is your only issue, we are really sorry about that. There is a workaround for you, you can create FsUnit project inside your solution, reference the latest NUnit package, and copy there few implementation files from here