Thursday, June 10, 2010

Can't Load Library in Visual Studio 2010 Design Mode for Windows Forms

Having trouble opening a form in the Designed in Visual Studio 2010?

If the form contains controls in another library, and that library is a project file in your solution, but it's complaining that it can't load the library not matter how many times you Clean and Rebuild everything, here's the workaround:

Open the compiler settings for the library that can't be loaded. Change something. Anything - just register a change. You can change it back if you like, as long as Visual Studio 2010 registers that the settings are "dirty".

Then compile everything.

Then open your form.

Yes, it worked for me (reproducably) after spending several hours scratching my head.

No, I have no idea why.

No comments: