Closed csim closed 1 month ago
Thanks for the report @csim To help us understand, is there a reason the tests must target net45 as a compilation target?
@csim You are correct, that is compatibility at its best [not] ;-)
As @stevenaw says, you should be able to run the test project at a higher framework version than your project under test. That could solve this.
But, we could also do as you suggest and release a 4.3.2 version which uses the 3.15.4 engine. That would solve the issue wrt net8. That should be a very minor release change. We will see what we can do wrt to that.
I assume you're also aware the the test sdk has to be below version 17.4, because that also has a cutoff at framework 4.6.2.
Please also note that the support for net45 also apply for 4.3.1. The cutoff is at 4.4
UPDATE:
We need to get out a fix for this. I tried running it under a lower dotnet sdk, using a gobal.json file to set to net 6, but it still crashes. This version of the engine actually enumerates ALL versions, and ignores the global.json file. That is not good.
I also tried to override the 3.13.2 with a package reference directly to 3.15.4, but it doesn't override it, and that is surely due to the way we have the engine embedded here.
@csim I built a 4.3.2-alpha.1 package, enclosed here in the zip file. Copy it down to a local folder (e.g. c:\nuget), add/edit a nuget.config to have a key pointing to that folder, and update the csproj. Tried on a local repro and it worked here.
Please confirm.
If it works for you, I'll take it through bureaucracy and get it released during the weekend.
Example nuget.config:
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<packageSources>
<clear />
<add key="Local" value="C:\nuget" />
<add key="nuget" value="https://api.nuget.org/v3/index.json"/>
</packageSources>
</configuration>
Released 4.3.2, on nuget now
Thank you so much!
We produce an SDK and our consuming partners are locked on old framework versions. We want to ideally test against old framework versions to guarantee compatibility. This change will enable us to move forward with things .NET 8 and still test against old versions.
We are working to integrate the new adaptor package version 4.3.2
Hi Folks, it looks like I may have miscommunicated the exact ask here.
The old framework deprecation happened in the adapter transition from v4.3.0 -> v4.3.1. I mistakenly assumed that the v4.3 chain was compatible with net45 and netcoreapp2.1.
Because of this we can't use the v4.3.1 or v4.3.2 version of the adaptor on our legacy testing projects. Perhaps enabling .NET 8 in this version will help others.
We actually need a patch to v4.2.1 to enable .NET 8. Would that be possible?
Thanks again for all your help on this issue and sorry for the rehash.
4.3.2 support down to net framework 3.5, that is it includes 4.5. With netcore, it does not support netcore 2.1, lowest is netcore 3.1
Also have a look at #1026 . This popped up and was the cause for the 4.3.1.
It would then be the netcore 2.1 that is your challenge. And, you can target anything, from netcore 3.1, so that means all you have to do is to set the test project to netcore 3.1, and then keep your classlibs at netcore 2.1. That will still work.
I am skeptical of moving down to 4.2. The further back we go, the higher risk of a major fault. The 4.3 adapter series uses the 3.15 engine series. The 4.2 uses the 3.13 engine series. I am not sure if we can upgrade that.
Also, I am personally running out of time now, I have 3 more days and then I leave for a month.
This is commit with the changes I did for 4.3.2, as you can see they are very small: https://github.com/nunit/nunit3-vs-adapter/commit/b3263eb88449485ec469d8f8ba8fdb126e0b28a9
The thing is to run all the tests, and ensure this is actually working.
PS: About the issue above, I noted in my repro here that I started to get InternalTrace log files again.
Thanks for all the information, we will try to avoid netcorapp2.1 for now.
@csim May I ask, what kind of software is this ? Libraries or application?
Btw, here is the link to the repro project I made based on your information above.
https://github.com/nunit/nunit3-vs-adapter.issues/tree/master/Issue1144
PS: If this is critical for you, I can manage to get out a 4.2.2, with no warranty that it will be working in all aspects though, but it may be end of next week.
UPDATE:
Sorry, I didnt see your earlier post here, saying it is SDKs.
I'll see what I can do the next few days, but I am travelling from Sun - Wedn,, so it may be end of next week.
After installing .NET 8, running "dotnet test" throws the error:
Upgrading NUnit3TestAdaptor is not possible because the test project targets net45 which is not supported by the NUnit3TestAdapter package starting in version 4.3.1.
Unless I've missed something, it appears as though it is not possible to use "dotnet test" for a test project targeting net45 on a machine that has .NET 8 installed with NUnit3TestAdapter 4.3.0
I can understand deprecating old framework versions, but could we get a 4.3 patch to enable "dotnet test" for machines that have .NET 8 installed?