C
C#•2mo ago
Abou

[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
Streamable
Watch 2024-09-10 18-03-57 | Streamable
Watch "2024-09-10 18-03-57" on Streamable.
No description
16 Replies
Jimmacle
Jimmacle•2mo ago
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
Abou
Abou•2mo ago
It doesn't do anything when I do f4
Jimmacle
Jimmacle•2mo ago
just open the properties of the project then, should be in there
Abou
Abou•2mo ago
TestProject
No description
Abou
Abou•2mo ago
WinFormsApp1
No description
Jimmacle
Jimmacle•2mo ago
ah, change the target framework of your test project to net8.0-windows
Abou
Abou•2mo ago
Working You're the boss
Jimmacle
Jimmacle•2mo ago
i'm kind of curious how you're doing winforms in rider without a designer
Abou
Abou•2mo ago
I thought I had checked and done it before, thanks again!!! In other words, without a designer? I'm a beginner at c#
Jimmacle
Jimmacle•2mo ago
how are you arranging things in your form? rider doesn't have a visual editor for windows forms GUIs on modern .NET versions
Abou
Abou•2mo ago
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?
Jimmacle
Jimmacle•2mo ago
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
Abou
Abou•2mo ago
Yep, I see. And to have a designer I guess I have to choose something when I create the project?
Jimmacle
Jimmacle•2mo ago
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
Abou
Abou•2mo ago
Erf, I hate visual studio...
Unknown User
Unknown User•2mo ago
Message Not Public
Sign In & Join Server To View
Want results from more Discord servers?
Add your server