C
C#5mo ago
Camster

✅ Winforms Forms converted to just c# classes

I updated visual studio this week to the latest version, and now in my winforms project all my forms are just c# classes. I don't know how to get to the UI designer.
No description
27 Replies
leowest
leowest5mo ago
can u show the content of one of those cs files
Camster
CamsterOP5mo ago
Yes. It seems to have all the form components like before
No description
Camster
CamsterOP5mo ago
But when I double-click it, it just opens the cs file
Petris
Petris5mo ago
I had this issue like a week ago but I don't remember how I fixed it tbh
leowest
leowest5mo ago
I know how to fix it but I need to see one of those files to confirm my suspicious usually that happens when you add classes and stuff before the form class
Camster
CamsterOP5mo ago
One of the cs files?
Petris
Petris5mo ago
it was purely a VS issue in my case
leowest
leowest5mo ago
yes for example the content of ChapterForm.cs
Camster
CamsterOP5mo ago
No description
Camster
CamsterOP5mo ago
Yeah, has to be a VS issue. This was working just before I updated.
leowest
leowest5mo ago
well its not recognizing Form in your code for some reason
Camster
CamsterOP5mo ago
Yeah, totally weird
leowest
leowest5mo ago
can u post your csproj?
Camster
CamsterOP5mo ago
Yeah
No description
leowest
leowest5mo ago
yeah so what I Have seen before it people add say a class before the : Form line and it break the designer which is not your case
Camster
CamsterOP5mo ago
whoa It just fixed by itself
leowest
leowest5mo ago
lol could have been just $vsdrunk
MODiX
MODiX5mo ago
* close VS * remove the hidden folder .vs * remove all bin and obj folder next to each csproj (DO NOT TOUCH THE .git FOLDER OR WHAT'S INSIDE) * restart vs
Camster
CamsterOP5mo ago
I hit the enter key in the class, and then they all returned to the normal form icon lol
leowest
leowest5mo ago
where did u hit enter
Camster
CamsterOP5mo ago
Just added a new line after the namespace
No description
Camster
CamsterOP5mo ago
And then, poof. It's working now. lol
leowest
leowest5mo ago
mmm I wonder if for some funky reason the lack of space there was making it confuse
Camster
CamsterOP5mo ago
Dunno, it fixed it for all my other files too. Must've just been a hiccup. Thank you for the help! 🙂
leowest
leowest5mo ago
hey we didnt do anything all on you 😉 $close
MODiX
MODiX5mo ago
If you have no further questions, please use /close to mark the forum thread as answered
Petris
Petris5mo ago
yeah it was something like that in my case too i don't remember what it was exactly though but removing .vs didn't help either or git clean -fdx to be exact
Want results from more Discord servers?
Add your server