Tuesday, May 16, 2006

The bane of my life for many weeks (Solved)

A retro post which refers to an incident that was actually solved a couple of weeks back, but I didn't have a Blog then did I? :)

Once upon a time (It could be up to about 6 months back). I had a perfectly working ASP.Net WebApp when suddenly and through no fault of mine..... (never is, is it?)

.... my copy of Visual Studio broke.

Well I say it broke. What I mean is that the QuickWatch broke. But if there was ever a feature I use all the time it's QuickWatch.

What I mean to say is that while simple types (int32, String etc) would work fine, complex classes would fail to display the little plus sign which allows one to expand the item being watched and to then see all of it's properties.

More recently I discovered that this only happens in VB.Net (and before the zealots jump out and kill VB, I must point out that this is not a flaw in the language. It's a flaw in the VB part of the IDE).

Further more I already knew that this is a project based problem. That is, only a select few projects suffer from this.

This plagued me at work for some time.

I later found the answer while programming my 2 latest DXCore offerings (DeclareIt and MoveIt). Both are now available by the way (in a sort of beta testing open source kinda way) at http://www.rorybecker.co.uk

I had been besieged by the same problem. My solution, in this case contained a few different plugins (again written in VB.net) but nothing that special.

I was livid. That B*stard bug had leapt from my work PC to my home PC and now my "fun relaxation" programming was becoming as stressful as my work programming.

That was it.... I had to do something...

I spent all night (on and off) visiting forums and google groups and found lots of people who seemed to be experiencing the same problem. None of whom had any answer..

Finally I found someone who had the answer... the holy grail... the goose that laid the golden egg.

But damn it I can't find it any more. That's right I have no idea who you can actually thank for finding this little nugget of information.



Oh yeah sorry that's right I didn't tell you why this happens yet. :) Sorry

Well it turns out that this happens if your solution contains a project with no compilable code in it :)

Yup its that simple

In my case I have a project for creating my plugin repository homepage which , due to it's very simple HTML/CSS approach (due to my being too cheap to plump for real hosting with asp.net facility), had no compilable code in it whatsoever.

So long story short (oops too late) all you have to do is to find that one ( ok I guess there might be more than one) project in your solution which has no code(VB/C#/C++ etc) in it, and then add a single class ( class1.vb/class1.cs/class1.whateverthoseawkwardc++guysareusingthesedays)
Compile once and your done.

Go on try it... Yeah now put a QuickWatch on that class instance over there (yes that one)... See that plus sign (you do remember those don't you?) yeah expand that.

Now doesn't that feel better :)...

Now go get a beer..

You deserve one...

And so do I :)

No comments: