Telerik blogs
The other day I had a very strange Visual Studio 2005 experience. I was testing the new design time capabilities of r.a.d.tabstrip and something went extremely wrong. My test environment consists of a WebControlLibrary project (the control itself) and a WebSite with a single aspx page containing nothing but a humble r.a.d.tabstrip. The site has a project reference to the web control library so it gets rebuilt whenever I build the site. So far so good.
 
Here is the fun part - whenever I rebuilt the site and refreshed the page I received the following error:

Ok, i said to myself, it's debugging time. I attached a second Visual Studio 2005 and waited to catch the exception and see what's going on. Unlucky! r.a.d.tabstrip was doing fine in the second Visual Studio - no errors whatsoever. I thought it was my bad luck and continued with my work - closed the first "baaad" studio and continued with the second. The new feature was actually working and I, pleased with my success and superior programming skills, decided to implement another one. Tough luck - same error again after rebuild. I closed Visual Studio and opened it again - everything was fine! Rebuild - error. After a few more tries I got the pattern - rebuilding r.a.d.tabstrip makes Visual Studio show errors!

Here in telerik we have the practice when researching various capabilities (such as Visual Studio 2005 design time enhancements) to implement them in a so called "spike" project - then we know if it actually works and spread the goods among the products. 

After several hours spent in mad debugging I decided to try that spike and see if it breaks Visual Studio in the same way. No! It worked just fine. A quick WinMerge showed that I was missing one important bit - AssemblyInfo.cs. I plugged a brand new AssemblyInfo.cs with all the required stuff and ... it just worked! Without that file my assembly was being built with version "0.0.0.0" which by some reason prevented Visual Studio from working correctly.

Was that a stupid mistake? Yes - every .net project should have an AssemblyInfo.cs!
Was the error message helpful? By no means!!! It made me debug all day long without a clue what is actually going on.

The moral of this blog post would be "Never show meaningless error messages to your users. If you have no idea what's gone wrong just admit it."


rahnev
About the Author

Stefan Rahnev

Stefan Rahnev (@StDiR) is Product Manager for Telerik Kendo UI living in Sofia, Bulgaria. He has been working for the company since 2005, when he started out as a regular support officer. His next steps at Telerik took him through the positions of Technical Support Director, co-team leader in one of the ASP.NET AJAX teams and unit manager for UI for ASP.NET AJAX and Kendo UI. Stefan’s main interests are web development, agile processes planning and management, client services and psychology.

Comments

Comments are disabled in preview mode.