Saturday, February 21, 2004

The format of the file 'VSUserControlHost.dll' is invalid

I've been struggling for a few days with an exception that kept on being raised when authoring my own composite ASP.NET Web Controls:

The format of the file 'VSUserControlHost.dll' is invalid

After spending some time banging my head against a brick wall, it turns out that the cause was the otherwise excellent CodeSmith plugin for VS.NET, which I use to produce things like type-safe collections; disabling it removes the problem immediately.