Attention: We are retiring the ASP.NET Community Blogs. Learn more >

More IDE (Windows Forms) Woes

So, about 25% of our Builds now require us to Delete our obj and bin folders to get a clean build.  We can change the name of a control, do a Build and it fails with 10+ errors that make no sense.  Stuff like 'variable not declared' when in fact it is.  So, we delete the bin and obj, do another Build and we will get 0 errors but the MessageBox, "there were build errors" pops up.  We do another build and all works.  We code away, do 2-3 more builds, all is well, then, it happens again; the same 10+ variable not declared build error. 

Is this going to be any better in Whidbey?    

[Now Playing: Michael Bublé - Fever (03:52)]

12 Comments

  • Are you building more than one solution into a single directory? (i.e. ..\..\bin\ )

  • Nope. One solution, approx 10 projects. Some of the projects do reside in other solutions.



    Here is a sample of what we se...notice the line number 16707566...no such line event exists,



    "F:\Projects\AMNET\CDS Forms\Search\frmEventSearch.vb(16707566): Name '_dtpSearch' is not declared."



    Yes, _dtpSearch is declared.





  • Welcome to the club.



    We have this happen to us all the time too, with both webforms and winforms solutions, VS.NET 2002 or 2003 (VB.NET heavy solutions more often that C# solutions).



    The latest frustration we've started experiencing is the random loss of Intellisense in the IDE for our VS.NET 2k3 VB.NET projects. We've also completely lost our Intellisense in the immediate and command windows, too.



    Argh!

  • Yup, we get that all the time, too. Frustrating as hell. Eventually if you hit F5 enough times it seems to go away. Closing VS.NET can help, too.

  • I have a prebuild script in place that does a deltree on .\bin & .\obj ... seems to clear some of it away

  • C# or VB.NET? I use VB.NET and don't experience this at all. I develop mostly Windows Forms applications... have one open right now as a matter of fact and I'm on vacation ;-)

  • doh!, submitted too soon. The question is targetted to everyone who responded, it looks like one of your projects is at least using VB. The other question I have, are you modifying any of the "generated code" section (other than New())?



    I have noticed that if you modify this code, you should load the designer again, make some small change, and save the form again. This seems to clear up any issues that I've run into. Usually, I only modify the this code if I'm doing an upgrade from VB6->VB.NET... it's easier for me to replace all of the Ax[stuff] with .NET native by changing the code and fixing any errors that occur. Once this is done, switch back to the form designer, tweak something and save it. All is good.

  • Cory, I tried your suggestion. Worked at first, then on the next build they all returned again.

  • Todays only solution is:

    1) ReBuild solution

    2) Delete *obj *bin directories and compile

    (It's basically like 1.)

    3) Pray for Microsoft to fix some bugs.

  • I fixed for me the problem.

    Don;t know why, but it's seems like one project is mal-formed, therefore the solution is to remove it, create it again and add all the files (*.vb, etc) again to the "new" project. Then you'll have to re-reference the project for the other projects that referenced it. It can be anything, but this worked for me, try and you'll never have to rebuild you solution over and over.

  • I had a student create a VB.Net form using the IDE. Just a few labels and text boxes. When the student opened the project the next day the form displayed as a blank page. When the project was run, the form appeared as designed. We would like to add some buttons, but cannot see the form in the IDE. Any help would be appreciated.

  • I need to clean-up my IDE

Comments have been disabled for this content.