I’ve been getting a lot of Error Creating Control in the designer recently. Well, probably recently only because I’ve been using the designer a bit over the last couple of days to build some data entry heavy pages that use my DataBinder control, which is a lot easier to set up using the designer than in markup since it’s an extender control.
But more than a few times in the last few days Visual Studio had decided to mangle my control with an error like this:
It looks like somehow Visual Studio is failing to properly sync the files in the BIN directory (which are not actually used in the designer) and the temporary copy of the assemblies that simulates the ASP.NET temporary assembly directory. How these files can get out of sync or how they even can be differentiated is something I don’t understand.
I’ve been trying to pinpoint what causes the problem and it seems (although I can’t duplicate it 100%) that when the underlying control assembly changes these errors start popping up in the designer. In this particular project I am using controls in my own Web Control project and since I’m working on the library at the moment this control assembly gets recompiled occasionally. Every time a change is made it seems like Visual Studio screws this up.
The resolution? Restart Visual Studio which cleans out the temporary assembly folder. When I come back in and re-open the page everything is as it should be.
It seems this behavior is something new though – I’ve done heavy control development and never really noticed issues with this until Visual Studio 2008 released possibly even as late as SP1. In the past I’ve always been able to use the designer’s Refresh option to get around new assemblies, but this no longer seems to work. The errors in the designer are so common that I am just not using the damn thing except for a few things like hooking up data binding to my custom binder and other extender controls which are just easier to deal with this way.
The VS designer just keeps getting worse with each version and even each cumulative update it seems. Yeah sure there are new features that are really nice too, but when stability suffers I couldn’t give a rat’s ass for new features when the designer becomes unusable. I just want the thing to work :-} and not start me into trouble shooting or restart mode every 20 minutes. I really hope Microsoft is going to spend some time on quality control on the designer for VS 2010.
Heck even better give me a way to use the property sheet COMPLETELY without the designer first having to be activated. Specifically I’d like to be able to set extender control properties without having to switch into the designer. It would be killer if more focus could go into bringing the markup editor on par in terms of support functionality that the designer supports (like extenders, many of the localization features, even things like event hookups etc.).
Ah yeah, one can dream…
Other Posts you might also like