Sunday, March 20, 2011

Could not find 'Program' specified for Main method

This error message occurs when we define in our project settings -> Application -> Startup object a reference to an non-existing class.

We usually encounter this error after renaming our main project's namespace. Visual Studio's rename command won't change your Startup object to the newly renamed class, so make sure you change it to the new namespace after the rename!

Frequent error messages:
Could not find 'Program' specified for Main method
Could not find 'Shell.App' specified for Main method

No comments: