摘要:最近一个C#项目升级到4.5框架后,无法运行测试。经过一番折腾后终于在国外一个网站上找到解决方法,也希望大家解决问题引以为戒,不要动不动就重装系统,时间就是金钱啊......
框架升级后你会发现VS2015运行,无法进行一直有个错误!错误说明也不清楚,只是说无法运行!
后来查看C:\Users\用户名\AppData\Local\Temp发现错误log!
错误内容很长,我就贴一段有问题的。
----------------------------------------------------------------------------
[0898:1304][2014-04-11T09:08:22]: Loading managed bootstrapper application.
[0898:1304][2014-04-11T09:08:22]: Error 0x80131902: Failed to create the managed bootstrapper application.
[0898:1304][2014-04-11T09:08:22]: Error 0x80131902: Failed to create UX.
[0898:1304][2014-04-11T09:08:22]: Error 0x80131902: Failed to load UX.
[0898:1304][2014-04-11T09:08:22]: Error 0x80131902: Failed while running
…..
[0898:1304][2014-04-11T09:08:22]: Error 0x80131902: Failed to run per-user mode.
[0898:1304][2014-04-11T09:08:22]: Exit code: 0x80131902, restarting: No
--------------------------------------------------------------------------------
经过Edge浏览器自动翻译过来就是
----------------------------------------------
错误 0x80131902:无法创建托管引导程序应用程序。
错误 0x80131902:无法创建 UX。
错误 0x80131902:加载 UX 失败。
错误 0x80131902:运行时失败。
......
错误 0x80131902:无法运行每个用户模式。
----------------------------------------------
解决办法:
The error code 0x80131902, means that the .NET Framework could not be loaded (more specifically, an AppDomain could not be created).
设置-控制面板-程序和功能-启用或关闭windows功能!关闭.net 3.5再运行你就发现问题已经解决了!
turned off the Microsoft .NET Framework 3.5.1