How do you add an existing form to a new project?

后端 未结 21 2200
予麋鹿
予麋鹿 2020-12-13 09:06

I have never been able to successfully add a Form from an existing file to a new project.

I read on a blog that you add just the *.cs file and the depen

21条回答
  •  醉话见心
    2020-12-13 09:33

    Here's an approach that doesn't involve closing the project and reopening it:

    1. Add the 3 existing form files (cs, Designer.cs and resx).
    2. Now, exclude the 3 files you just added from the project.
    3. Open the Add existing item explorer window and go to your project directory.
    4. Select the cs file and Add.
    5. Tada. all good

提交回复
热议问题