Reputation: 9
I have added a windows form to my visual studio 2013 project by using the option "Add an existing item". I only add the .cs file in the project and the rest of files (.Designer.cs, *.resx) are generated automatically. I can view the code but i m unable to view designer of this form. (i cant edit form by using toolbox). Any solution for this..?? Thanks
Upvotes: 0
Views: 919
Reputation: 21
Open the project file (yourproject.csproj) in your favorite text editor.
Ensure that the entry that references the form in the project has a subtype of "Form".
Steps: Locate the line that includes said form in the project.
<Compile Include="Forms\Login.cs" />
Change to:
<Compile Include="Forms\Login.cs" >
<SubType>Form</SubType>
</Compile>
Save the csproj file and open the project/solution.
Upvotes: 1
Reputation: 9
i found a solution.. All u need is to add the .cs file of the windows form (.designer.cs and .resx files will be added automatically). then close your solution and reopen it after a while. Your .cs file will be recognized as windows form by visual studio...
Upvotes: 0
Reputation: 5540
The best way to this is:
Upvotes: 0