[Windows Phone] Common Language Runtime detected an invalid program

今天打开Microsoft Visual Studio 2010 Express for Windows Phone,打开一个工程,双击xaml文件,发现无法打开界面编辑器了。出现以下错误:

An Unhandled Exception has occurred.

System.InvalidProgramException

Common Language Runtime detected an invalid program.

......

解决方法:卸载Silverlight,然后重新安装Silverlight 4版本。

猜测可能是系统自动升级了Silverlight以后,版本不兼容导致的错误。

为了解决这个错误,搞了好久,发出来共享,以免有人也出现这个问题浪费更多时间。

你可能感兴趣的:(windows phone)