Wednesday, February 01, 2006

BC30251 has no constructors

Finished developing and testing on the local machine (XP), I uploaded the latest change to the staging server running windows 2003, using the web deployment add in for VS 2005. Try to test the application an error is thrown advising that one of the user control doesn’t have a constructor. The error code was BC30251. Find the reference:

A type does not support a call to Sub New(). One possible cause is a corrupted compiler or binary file.

Error ID: BC3025

To correct this error

1. If the type is in a different project or in a referenced file, reinstall the project or file.

2. If the type is in the same project, recompile the assembly containing the type.

3. If the error recurs, reinstall the Visual Basic compiler.

4. If the error persists, gather information about the circumstances and notify Microsoft Product Support Services.

Tried to recompile the application and redeploy it again doesn’t work. I tried to avoid as much as possible to reinstall the .NET framework or VS 2005. I commented few lines of code inside the user control, try again to deploy in the same way, and it worked! Finally, I moved few lines of code to other utility (helper class) and the application went perfect. Just another fun thing with new stuff .