Because I have to snatch the time I can get to write code due to my workload, the time I get spent in Visual Studio 2008 is prized, but recently for two days I couldn't resolve a problem I had with it and just wanted to pick up the phone to Microsoft and shout at someone.
I'd made a namespace change to a framework class for MP as I wasn't happy with MediaPanther.Framework.Content.Content as a class name. I made the change, compiled to see what code elsewhere I would need to change for this, made the changes and got a successful build. Moving on to something else the website started throwing weird exceptions for type-not-found on some referenced User Web Controls.
Finding that no matter what page or control I tried to reference by type in the website, VS 2008 wouldn't recognise the type, but would build, I thought some weird Voodoo magic was going on. After much throwing of toys out of the pram, I spent some time in the Class Explorer and found that using the rebuild-all on the web-project, I got a whole load of compiler errors to do with the namespace change that I didn't get with the regular build/rebuild menu options in VS. After fixing these compiler errors, the site now worked again.
That makes no sense to me why the compiler wouldn't throw those errors normally, but if this ever happens to you, give that a shot, it may save some hair being pulled out. This was an asp.NET 3.5 app.

0 comments:
Post a Comment