![]() Add a new partial declaration in a file named like "", "", "". For example, you have the form file "MyForm.cs". My own trick is: add ".designer" for the name. There is a problem, though: on click, stupid designer will open a different non-existing "form". Add more files with partial declarations of the same form class (or user control, for that matter).How do you think, what is the refactoring engine for? When you put then to use, always give them all semantically sensitive names. They violate (good) Microsoft naming, which is even good: it tells you what controls you did not put to use yet. For example, if you need and array of text boxed, use array in first place, not individual controls. All periodic work should be done in code. Needs some words of wisedom to set up and/or use a server Revision control systems, which to choose from?, These days, not using Revision Control System is a crime against yourself. Instead of back-up, it should be a use of some Revision Control System, committing in small steps, to be able to trace back back by any number of steps.Some addition to the advice by Bill (Solution 2). Hopefully, if you have Class files (all code, no GUI), those can be left untouched and restored easily. While #5 is an extreme measure, it has worked for me the few times I've had to do it. open the code-behind pages for UserControls, and Forms, and paste in the saved code. Open the Designer.cs files of the Forms or UserControls in the new Project, and paste in the saved code. are all the same as the Project/Solution you are trying to salvage. ![]() you had in the original Project/Solution: drop the same Controls on the Forms or UserControls. create a new Project/Solution: re-create the Forms, UserControls, etc. you could try modifying your back-up copy step-by-step until you have a working app, and then try re-creating only those parts of your app that refuse to give you the design-time view you expect. If you're lucky, you just might find some key difference, a difference that can be fixed. drop a MenuStrip on it, then copy the Designer.cs file, and close the Solution, and paste the Designer.cs file copy in a text editor: compare its structure carefully with the structure of the Designer.cs file that you know is not working for you (not giving a proper design-time view). close the Project/Solution, and try re-opening it: if that doesn't work, quit Visual Studio, re-open it, and reload the Project/Solution: if that doesn't work then:ģ. immediately make a back-up copy of the whole Application.Ģ. Sometimes a WinForms app gets corrupted, and you can't get the design-time view of a Form, or UserControl, to appear correctly, but you do, as you show here, have what looks like a valid Designer.cs file, and valid code-behind pages.ġ. ![]()
0 Comments
Leave a Reply. |