views:

65

answers:

3

<rant>
In development, the biggest time sink seems to be Visual Studio. Solving issues with it eats up half of my development time and I'm left implementing with half the alloted time!
</rant>

Back to the question. I've got a couple of custom controls developed in ASP.NET: RaiseEventControl, HandlerControl. They reside on a Parent Form. The idea is to have the RaiseEventControl fire an Event, the parent (via adding a handler) pushes the event down to the HandlerControl. Easy as pie.

Things were working well, but I had to change the signature of the event. After changing the signature, Visual Studio refuses to notice the change.

I've tried recompiling the website. Opening and closing Visual Studio (I know, lame sauce, but it works for windows.) I tried to search for the issue on Google and found nothing. I'm not entirely sure how to articulate the problem, which could be why I can't find a solution.

So, do you know why VS won't update my event signatures?

A: 

Can you explain what you mean by "visual studio fails to notice"? Is it not showing up in the drop downs, property grid, etc ...

If Visual Studio fails to notice after a recompile and restart it is almost certainly an issue in how you updated the signature. Visual Studio does not cache this type of information between sessions and instead recalculates it on every open. So it is simply recalculating every time the old signature. That must be present still in some place in your project.

JaredPar
@Jared - Fails to notice, as in, the IDE/Intellisense doesn't pick up the updated signature.
Gavin Miller
@LFSR Consulting, if that's the case and it's picking up the old signature then it's likely not updated properly or in all places. Have you used reflector to verify it is being written the way you think it is?
JaredPar
@JaredPar - No I haven't, I'll give that a try
Gavin Miller
A: 

Are the custom controls in a separate assembly? If so, it usually helped when I just recompiled the entire solution or, if that didn't help, just remove the reference to the assembly and add it back in. But then, I'm using WinForms or WPF and don't know how things are in ASP.NET.

OregonGhost
+1  A: 

<AntiRant>
I'd rather pound ten penny nails down my p*hole than code outside VS.
</AntiRant>

When has visual studio ever refactored like this? Methods in aspx/cx/whateverx are treated like magic strings instead of method names. In fact, since these pages are XML, they ARE magic strings. Visual studio has never updated any XML (aspx/xaml/xoml) to reflect changes in code. Its just never done it.

There are lots of things visual studio has never done. Such as make me a sammich. I'm not going to fault VS for this. That's what women are for. That's just the way it is.

Why won't it do this? Because its not coded to. Maybe they'll include this in their refactoring support. Or maybe you should just get one of the many available addins (like ReSharper) that add this kind of support in. And also do tons of other stuff that visual studio doesn't do.

If they could clawhammer-out the ten penny nails, I might actually use one or two of them.

Will
lol, wow that was interesting! :)
Dana Holt