[Rider] Incompatible framework for unit tests
Hi, would anyone know how to run unit tests on a windows-forms solution on rider?
When I want to add my windows-form solution to my unit test project using the references, it tells me that there's a problem with incompatible framework (btw both have the same versions)
Preview of problem : https://streamable.com/ymnra5
16 Replies
can you go into the csproj files (click the project and hit F4) and share what the target framework in each one is?
because i trust rider saying the frameworks are incompatible more than you saying they aren't 😛
if you have a winforms designer in rider, then your winforms project is on .NET Framework and would indeed be incompatible with a .NET 8 unit test project
It doesn't do anything when I do f4
just open the properties of the project then, should be in there
TestProject
WinFormsApp1
ah, change the target framework of your test project to net8.0-windows
Working
You're the boss
i'm kind of curious how you're doing winforms in rider without a designer
I thought I had checked and done it before, thanks again!!!
In other words, without a designer?
I'm a beginner at c#
how are you arranging things in your form?
rider doesn't have a visual editor for windows forms GUIs on modern .NET versions
I'm a web developer, but I have to do C# with the courses.
So I have to use a designer to get a graphical interface?
i mean, it's not required
but without one you'll need to write all the C# code that would normally be generated by the designer but by hand
Yep, I see.
And to have a designer I guess I have to choose something when I create the project?
no, rider simply doesn't have a designer for windows forms in .NET 5+
you would have to use .NET Framework which is arguably a worse option or use a different IDE like visual studio
or a different GUI framework like WPF
Erf, I hate visual studio...
Unknown User•4mo ago
Message Not Public
Sign In & Join Server To View