1

I have a project in visual studio, I made some amendments I don't think involving any change in my code, but involving renaming files..

Then I got this error..

enter image description here

enter image description here

It does seem to have resolved itself, maybe from closing all the tabs and doing a rebuild, or maybe some other reason, I don't know..

But i'd like to know what kind of designer code I should look for and how I could even debug it, when the debugger won't even open and I can't start the program. It suddenly resolved itself, but i'd like to know what I should've done while it hadn't. I have looked at other answers to this question but they often mention about a line number. I notice here Object reference not set to an instance of an object - how to find the offending object name in the exception? one comment from 'itowlson' said "I think you need to copy the PDB file to the program location" but it's not clear to me from that, what would then solve it. I didn't do that, but prior to it somehow resolving itself, i'd like to have had some ideas of what to look at, because on another day(git or a backup aside!), I might not be so lucky!

Community
  • 1
  • 1
barlop
  • 12,887
  • 8
  • 80
  • 109
  • Have a look at http://stackoverflow.com/questions/7765538/how-to-resolve-vs2010-windows-form-designer-issue-base-class-could-not-be-loade – Vinay Pandey Sep 04 '16 at 22:34
  • 1
    Seen error a lot. The way of fixing is to edit the form1.Designer.cs file. The error is cause by the form textboxwithHistory was deleted in the form but is still in the form1.Designer.cs. I would comment out all references to the text box in the designer file. – jdweng Sep 04 '16 at 23:09
  • I have the same problem with VS Ultimate 2012 Version 11.0.61219.00 Update 5. Every time I build, I get this error, but it does not tell me the file, nor the line number. How do I track it down? Thanks. – Stack0verflow Jan 25 '18 at 20:12
  • @Stack0verflow well maybe you dont have the same problem then cos if you read the comment by jd and you see the error I got, it mentions textboxwithHistory which is a cs file in my project. And jd says the issue is in the form's designer file. Maybe you can isolate what form it is. And deal with the designer file.. Maybe redraw the form fresh. Putting copy/pasting the controls in and removing the original form. – barlop Jan 25 '18 at 23:48

0 Answers0