Thursday, February 7, 2008

ASP.NET custom controls dll issues

I have an ASP.NET vb website that uses a large number of custom controls that I modify a lot during development. These rely a bit on some generic code from the application and some of the settings in web.config. Thus they are a bit of a pain to compile by themselves (as far as I know anyway).

I have since included customcontrols.vb into my project as well as the customcontrols.dll. Any change to customcontrols.vb has an effect as soon as the project is compiled but the dll is not changed.

So you'd think that the dll isn't required right? Its not being modified and the changes are present in the website. Right? Wrong, for some reason the dll still has to be there.

This is mainly just a note to myself not to delete it again and spend an hour trying to work out why the website wouldn't compile. I think the dll is required for asp to know about the declarative syntax for the controls, so it can't just be any dll. Then when the controls are actually created the customcontrols.vb code must take precedence over the dll.

No comments: