I have created a C#/MVVM project which runs fine when I run it from within VS2010. I copied the exe file from the /release folder to the desktop and tried to run it as a standalone program and get the error message “MyProgram has stopped working”
My solution has two projects to it, MyProgram and MyProgramModel (…Model contains the EDMX model of the database items). The MyProgram project is set as the start up project.
Is there something I am missing when creating an exe for C#/MVVM?
As @BoltClock stated there should be another file in the Release folder you should copy also. Probably this is a dll named MyProgramModel.dll or something similar.
In order to receive more information you can wait Windows to try to do something to repair your program and then you will probably be displayed with a dialog similar to this one. Click on debug and there should be a more comprehensive error you can consider.