Can't open Windows Forms designer after updating to new csproj format

Viewed 1184

I updated a Windows Forms project to the new csproj format and now Visual Studio won't let me open the forms designer. All my FooForm.designer.cs and FooForm.resx files are no longer grouped hierarchically under FooForm.cs, and double clicking FooForm.cs just opens a code editor. If I right-click and choose Open With, there's no option for the Windows Forms editor. How can I get the forms editor back without reverting my csproj to the old format?

5 Answers

To open the forms designer in the new 2017 csproj format, right click and choose View Designer. Or double click and press Shift + F7.

Copy the files into a new folder (not in the project folder) then delete the files from the project folder. Then select Add->Existing Item, navigate to the folder you copied the files too and select FooForm.cs. This should then pull in all 3 files for you.

According to Microsoft, it's doesn't supported yet: Here and here

For .net core 3, there is a partial supporting, you can see here.

I believe that it will be expanded over time...

If you have VS2017, open the project using it. The class should change to a form. Save all. Open the project in VS2019 and you should be good to go.

When you are make now windows forms App, there are 2 type of project. If you select windows forms App(.NET Core), you can't use designer. you have to select windows forms App(.NET Framework).

Related