C
C#•3mo 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•3mo 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
AbouOP•3mo ago
It doesn't do anything when I do f4
Jimmacle
Jimmacle•3mo ago
just open the properties of the project then, should be in there
Abou
AbouOP•3mo ago
TestProject
No description
Abou
AbouOP•3mo ago
WinFormsApp1
No description
Jimmacle
Jimmacle•3mo ago
ah, change the target framework of your test project to net8.0-windows
Abou
AbouOP•3mo ago
Working You're the boss
Jimmacle
Jimmacle•3mo ago
i'm kind of curious how you're doing winforms in rider without a designer
Abou
AbouOP•3mo 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•3mo 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
AbouOP•3mo 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•3mo 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
AbouOP•3mo ago
Yep, I see. And to have a designer I guess I have to choose something when I create the project?
Jimmacle
Jimmacle•3mo 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
AbouOP•3mo ago
Erf, I hate visual studio...
Unknown User
Unknown User•3mo ago
Message Not Public
Sign In & Join Server To View
Want results from more Discord servers?
Add your server