-
Notifications
You must be signed in to change notification settings - Fork 152
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
Add .NET 8 build for nunit-agent #1374
Comments
They were different assemblies (not WinForms), but otherwise I had the same errors. |
Can you please try to run version 3.15.5 instead. |
Using 3.15.5 leads to the same error messages:
|
I confirm I get the same |
Thanks @ilCosmico and @mlessmann . I am on travel now, and have small opportunities to do changes myself. I can review, merge and get stuff out if you provide the code for this. The engine should be good for .net 8, that was done some time ago, and works for the adapter. So there is then the console app that remains. @mlessmann It seems you have found the reasons, and also, providing an agent for .net 8 should be trivial. But, need you to do the changes on the version315 branch. The process for the console/engine release is not trivial however, but having the code in there in a PR would certainly make it easier for us to get it out. I've created a milestone 3.17 for this issue. The branch name will remain version315 until I can get these sorted out. PS: I assume you guys now that using |
I have created a PR that adds .NET 8 builds for the console and the agent. My .NET 8 tests run successfully with this version locally. |
The scripts look ok to me. I'll try to use them "as is", and we see how it goes. |
@mlessmann Did you get a series of errors like this one:
|
@OsirisTerje Yes. That's why I added these entries to the affected csproj files: |
@mlessmann thanks for the great job! |
@mlessmann Thanks! |
@mlessmann @ilCosmico Please verify if these are working as they should. I am on travel tomorrow, so next week is probably best time for a prod release. PS: Note that two of the components didnt come out with the -dev suffix. Be aware of these wrt later upgrades. |
@ilCosmico It doesn't look related, but there are multiple similar issues like this one. It happens on the exit, so should not be a problem. The current issue however seems to be solved, right? |
Yes, right! |
I'm also getting the error above. The reason for the agent process crashing is that it uses the BinaryFormatter, which by default throws an exception in .NET 8. There is a compatibility flag that re-enables the BinaryFormatter. I've opened #1382 for this. Normally we are consuming nunit-console via an internal choco feed, on which we push the official package. However, we currently have a working environment with a self-compiled version, so getting a new release out is not time-critical for us. |
I'm using official Nuget packages instead, so I wait for 3.17 release 😅 |
Published latest from @mlessmann , binaryformatter fix, see https://github.com/nunit/nunit-console/releases/tag/V3.17.0-dev.3 |
@OsirisTerje with -dev.3 I get the original error again :/ |
Works on my end using the nuget package. @ilCosmico can you please try adding the following lines to the file
If it works with those changes then you should open a separate issue. Loading the WindowsDesktop framework probably cannot be enabled out-of-the-box, as it only works on Windows. |
@mlessmann I confirm that replacing @OsirisTerje can this be fixed when the new official NuGet package 3.17 will be release, please? |
@ilCosmico @mlessmann I am kind of blind here. Can you two work out what needs to be done here now, issues and PRs please. And I'll get it into the 3.17 when I am back, in a weeks time. During next week it should be possible to push out a new prod release. |
I understand that we need to edit the |
@ilCosmico I've opened #1383, but I have no idea how to fix the problem. |
@OsirisTerje this release works fine except for issue #1383 kindly opened by @mlessmann. I hope you have enough info to create a v3.17 that can be used for all targets (net472/net6/net7/net8) 😊 |
I have released version 3.17.0 now. The nuget packages are up, and the Choco package has also been uploaded, and just waiting for the Choco verification to pass. The release contains more than what is in the release notes. The extra is from backports where the milestones are set to other releases. This is the result of an automated release manager that doesn't handle cross version backports well. Sorry for that. |
@OsirisTerje I tried it and now I get the below error, even replacing Any idea? Do I need to wait for the fix of issue #1383?
I'm not sure it's related, but in the past few days, I updated some NuGet packages in the project, in particular |
No idea, without a repro it is near impossible to say anything. You can create a small repro and add that to the #1383 issue, where it seems to belong. |
@OsirisTerje Finally I found out the guilty: the adding of Here is a very simple project to reproduce the issue :) I hope this helps to fix the issue 🤞 |
Hi! I do get a similar issue, but not quite the same. This means the project doesn't properly contain all its dependencies, and is dependent upon the current PC installation. PS: THis problem is not the same issue as this one, and this one is closed. Suggest you raise another issue and copy the relevant information you have provided into that one. I doubt this works on earlier versions too, but nice if you check that out. |
@OsirisTerje the error you get is because of the issue explained in this same issue by @mlessmann, that's why I think that this issue should be reopened. BTW it's worth noting that no issues occur with .NET6 and .NET7. |
Ok, good, but since you know where the error occurs, then it would be awesome with a PR to fix it. Also see this comment #1374 (comment) about raising a new issue. The issue is not the important thing though, but since the fix in the PR related to this issue works for @mlessmann and others who do the same, the issue you point at seems related, but not the same. |
Ok, I will add it to issue #1383, but no idea how to fix it :) |
A |
We are currently migrating to .NET 8 and are having trouble executing NUnit 3.13 tests with the NUnit Console 3.16.3. There are some errors at test runtime that occur because the test is run on the .NET 7 build of nunit-agent. Specifically, the test depends on a particular version of a DLL that is only present in .NET 8.
Would it be possible to create a .NET 8 build of the nunit-agent?
I have already created branches from main and from the 3.16.3 tag and changed code and project files. I haven't touched the pipelines.
The text was updated successfully, but these errors were encountered: