4

Why am I getting error on my designer page without adding any piece of a code us...

 2 years ago
source link: https://www.codeproject.com/Questions/5318596/Why-am-I-getting-error-on-my-designer-page-without
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

See more:

At my First form1.cs[Design] page i got an error without even adding a piece of code

What I have tried:

Nothing yet yet because i don't know what to do, am just a beginer

Comments

If you want someone to help you fix an error, you need to tell us what the error is. Simply saying "I got an error" tells us nothing.

Click the green "Improve question" link and update your question to include the full details of the error.

We can't tell: we have no access to your project at all, and the reasons why can be quite complex.

Basically, when you design a form, VS compiles it because it is made up of at least two code elements: myfile.cs which you edit, and myfile.designer.cs which the system edits - the latter contains the code which actually constructs the form and places the controls on it both in your app when the form constructor is called, and in the designer when you open the from to make changes to the layout.

And any compilation failure in either file pretty much makes the designer throw up it's hands in horror, and you get an error.
But ... you can also get a designer error when your code for a UserControl on the form fails as well, or your constructor code fails at run time, or ... loads of different ways.
The simplest way to get a fail is to mark the form as abstract as even after nearly two decades VS still can't display an abstract control in the designer...

Normally, that error comes with a message which refers to a specific file and line - and which gives you a description of the error.
So start there. Read the error message, follow the link to the line of code. And think about what you did between the last "it works!" and first "oh crap" moments!

It's probably something very silly - but we can't help you find it at all, I'm afraid!


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK