This is one weird error I encountered while creating a simple Silverlight application.
Scenario: Tested my application and post that I decided (for some reasons not relevant here) to change the namespace of the classes in my silverlight project. As part of this, I changed the namespace of the App class in the App.xaml.cs file.
As soon as i ran the application again, it started giving me this error.
Solution: It turns out that when we change the namespace of the App class, the "Startup Object" in the project properties doesn't get updated causing this error. When we update this in the project properties it starts working fine again.