- android - RelativeLayout 背景可绘制重叠内容
- android - 如何链接 cpufeatures lib 以获取 native android 库?
- java - OnItemClickListener 不起作用,但 OnLongItemClickListener 在自定义 ListView 中起作用
- java - Android 文件转字符串
我有一台安装了 Windows 7 Professional 的客户端计算机。为了运行我最新的应用程序,我安装了 .Net Framework 4.0 Full,从 here 下载.我的应用程序工作正常。
不过,还有一个应用是用.Net framework 3.5开发的。当我尝试执行该应用程序时,出现错误:
C:\Windows\Microsoft.Net\Framework64\v2.0.50727\mscorepe.dll is either not designed to run on Windows or it contains an error ...
我曾尝试删除 .Net Framework 4.0 并再次重新安装,并尝试修复它,但似乎没有任何效果。错误仍然存在。
我已经尝试单独安装 .Net framework 3.5,但我无法安装它,因为机器上已经安装了较新的版本 (4.0)。
3.5 版的应用程序在其他客户端机器上运行良好,所以我猜这个问题与该特定机器上的 .Net Framework 安装无关。
有什么方法可以修复mscorpe.dll
或重新安装.Net framework 3.5 吗?
最佳答案
首先,确认文件已损坏且无法自动修复。
运行:
sfc /scanfile=C:\Windows\Microsoft.Net\Framework64\v2.0.50727\mscorepe.dll
如果您看到消息:
Windows Resource Protection found corrupt files but was unable to fix some of them.
这意味着Windows用于执行修复的文件和备份文件都已损坏。
Windows 无法自动修复该文件,并且在您重新安装 .Net 3.5 框架时不会替换该特定文件。
手动恢复文件:
获取文件的所有权:
takeown /f C:\Windows\Microsoft.Net\Framework64\v2.0.50727\mscorpe.dll
授予覆盖文件所需的权限:
icacls C:\Windows\Microsoft.Net\Framework64\v2.0.50727\mscorpe.dll /GRANT ADMINISTRATORS:F
用安装 DVD 中的原始文件替换该文件。请注意,这假定 DVD 在 D: 驱动器上可用。如有必要,更改驱动器号以适合您的设置。
"C:\Program Files (x86)\7-Zip\7z.exe" e D:\sources\install.wim -oC:\Windows\Microsoft.Net\Framework64\v2.0.50727\ 4\windows\Microsoft.Net\Framework64\v2.0.50727\mscorpe.dll
提示覆盖文件时输入Y
。
注意:如果您无法访问 Windows 安装 DVD 或 ISO,您可以运行前两个命令,然后从另一台运行 Windows 7 Professional x64 的计算机复制 mscorpe.dll
.确保从 C:\Windows\Microsoft.Net\Framework64\v2.0.50727\
文件夹中复制它。
关于c# - .Net 框架 mscorpe.dll 错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/28592443/
我有一台安装了 Windows 7 Professional 的客户端计算机。为了运行我最新的应用程序,我安装了 .Net Framework 4.0 Full,从 here 下载.我的应用程序工作正
我是一名优秀的程序员,十分优秀!