Microsoft .NET Framework帮助开发人员构建适用于Windows设备的应用程序。在Windows(Windows)中运行许多应用程序也需要该框架。.NET Framework安装可能会损坏并导致某些程序崩溃(some programs to crash)。
.NET Framework 错误还会阻止您的计算机安装 Windows 更新(prevent your computer from installing Windows updates)和获取更新的.NET Framework版本。Microsoft有一个专用的故障排除工具,可以诊断和修复.NET Framework安装。我们将向您展示如何在您的计算机上使用此工具。
安装Microsoft .NET Framework 修复工具(Microsoft .NET Framework Repair Tool)
- 在 Web 浏览器中访问 Microsoft .NET Framework 修复工具(official webpage for the Microsoft .NET Framework Repair Tool)的官方网页。
- 滚动到“下载信息”部分并选择Microsoft .NET Framework 修复工具(Microsoft .NET Framework Repair Tool)链接以下载文件。
- 双击(Double-click)netfxrepairtool.exe 文件,选中我已阅读并接受许可条款框并选择下一步(Next)。
等待(Wait)Microsoft .NET Framework 修复工具(Microsoft .NET Framework Repair Tool)扫描您的计算机以查找安装问题
。
- 如果该工具检测到任何问题,它会推荐可能的故障排除选项。选择下一步(Select Next)以应用建议的更改。
保持对话框打开并重新运行受影响的应用程序或系统进程。
- 如果Microsoft .NET Framework 修复工具(Microsoft .NET Framework Repair Tool)修复了问题,请选择完成(Finish)以关闭该工具。否则,请选择下一步(Next)以尝试探索更多故障排除修复程序。
重新安装Microsoft .NET Framework
尽管Microsoft在Windows中预安装了.NET Framework,但如果您的计算机没有特定的.NET Framework版本,某些应用程序将无法运行。
如果Microsoft .NET Framework 修复工具(Microsoft .NET Framework Repair Tool)建议重新安装.NET Framework,请安装与您的计算机兼容的最新版本。但是,如果由于缺少.NET Framework版本而导致程序无法启动,请安装应用所需的版本。
卸载 Microsoft .NET 框架
- 按(Press)Windows键,在搜索栏中键入 powershell,然后选择Run ISE as Administrator。
- 将以下命令粘贴到Powershell控制台中,然后按 Enter。
Get-Package -Name “Microsoft .Net Framework*” | 卸载包
- 您可能会收到下载和安装“nuget”包的提示。选择是(Yes)并按照提示进行操作。
重新安装 Microsoft .NET Framework
.NET Framework 4.8.1是最新的框架版本,它预装在Windows 11设备上。它(.NET Framework 4.8.1)支持以下Windows 10版本:
- Windows 2018 年10 月 10 日(October 2018) 更新(Update)(版本 1809)
- Windows 2018 年 4 月 10 日(April 2018) 更新(Update)(版本 1803)
- Windows 10秋季(Fall)创意者更新(Update)(版本 1709)
- Windows 10 创意者更新(Update)(版本 1703)
- Windows 10周年更新(Anniversary Update)(版本 1607)
- 视窗服务器 2019
- Windows 服务器,版本 1809
- Windows 服务器,版本 1803
- 视窗服务器 2016
.NET Framework 4.8.1在Windows 10版本 1507 和版本 1511中不起作用。转到Settings > System> 关于以检查您拥有的 Windows 10 版本(check what version of Windows 10 you have)。
如果您的 PC 不支持.NET Framework 4.8.1,请更新其操作系统或安装较旧的框架版本(install an older framework version)。
- 访问Microsoft网站上的.NET Framework 下载页面(.NET Framework download page)并展开支持的版本下拉部分。选择要在计算机上安装
的.NET Framework版本。(.NET Framework)
- 滚动到“运行时”部分并选择下载 .NET Framework 运行时(Download .NET Framework Runtime)以下载 Web 安装程序。
运行安装程序,按照安装提示进行操作,然后重新启动计算机。如果问题仍然存在,请在您的设备上
重新启用.NET Framework 。
重新启用 .NET Framework Windows
您可以通过关闭该功能并重新打开
来手动修复.NET Framework错误。(.NET Framework)
- 打开控制面板(Open the Control Panel)并选择程序(Programs)(或程序(Programs)和功能(Features))。
- (Select Turn Windows)选择打开或关闭
Windows功能。
- 取消选中列表中所有.NET Framework(.NET Framework)版本旁边的复选框,然后选择确定。
- 选择立即重新启动(Restart)以重新启动计算机。
- 打开控制面板(Control Panel)并选中您之前关闭的 .NET Frameworks旁边的框。选择确定(Select OK)继续。
- 您可能会收到从Windows Update下载文件以完成.NET Framework设置的提示。将您的计算机连接到 Internet,然后选择让 Windows Update(Let Windows Update)为您下载文件。
控制面板(Control Panel)将下载在您的计算机上设置.NET Framework所需的文件。(.NET Framework)下载过程大约需要 10-25 分钟,具体取决于您的 Internet 速度和.NET Framework版本。
- 选择立即重新启动(Restart)以重新启动计算机并完成设置过程。
运行系统文件检查器
系统文件检查器 (SFC) 实用程序(System File Checker (SFC) utility)可能会修复Windows中损坏的(Windows).NET Framework安装。如果Microsoft .NET Framework 修复工具(Microsoft .NET Framework Repair Tool)未发现或修复任何问题,
请运行(Run)SFC扫描。
将您的 PC 连接到 Wi-Fi 或以太网(Ethernet),然后按照以下步骤操作。
- (Type)在Windows搜索栏中键入cmd 并以管理员身份
运行命令提示符应用程序。(Command Prompt)
- 在控制台中键入或粘贴DISM.exe /Online /Cleanup-image /Restorehealth 并按Enter。
- 接下来,将 sfc /scannow 粘贴到控制台中,然后按Enter。
修补 .NET Framework
检查磁盘(Check Disk)( CHKDSK )实用程序是另一个用于诊断和修复(Utility)Windows中的文件损坏的工具。了解如何使用 Check Disk Utility 修复文件系统错误(fix file system errors with Check Disk Utility)。
如果修复.NET Framework(.NET Framework)后应用继续崩溃,请联系Microsoft 支持(Microsoft Support)或将问题报告给应用开发者。
How to Use the Microsoft .NET Framework Repair Tool (and Why)
Τhe Microsoft .NET Framework helps developers bυild applіcations for Windowѕ devices. The framework iѕ alsо required to run many аpplications in Windows. The .NET Framework installаtion can get corrupted and cause some programs to crash.
.NET Framework errors can also prevent your computer from installing Windows updates and from getting newer .NET Framework versions. Microsoft has a dedicated troubleshooting tool that diagnoses and repairs the .NET Framework installation. We’ll show you how to use this tool on your computer.
Install the Microsoft .NET Framework Repair Tool
- Head to the official webpage for the Microsoft .NET Framework Repair Tool in your web browser.
- Scroll to the “Download information” section and select the Microsoft .NET Framework Repair Tool link to download the file.
- Double-click the netfxrepairtool.exe file, check the I have read and accept the license terms box and select Next.
Wait while the Microsoft .NET Framework Repair Tool scans your computer for installation issues.
- If the tool detects any problems, it’ll recommend possible troubleshooting options. Select Next to apply the suggested changes.
Keep the dialog box open and rerun the affected application or system process.
- If the Microsoft .NET Framework Repair Tool fixed the problem, select Finish to close the tool. Otherwise, select Next to try to explore more troubleshooting fixes.
Reinstall the Microsoft .NET Framework
Although Microsoft pre-installs the .NET Framework in Windows, some applications won’t run if your computer doesn’t have a specific .NET Framework version.
If the Microsoft .NET Framework Repair Tool recommends reinstalling the .NET Framework, install the latest version compatible with your computer. But if a program fails to start due to a missing .NET Framework version, install the version needed by the app.
Uninstall Microsoft .NET Framework
- Press the Windows key, type powershell in the search bar, and select Run ISE as Administrator.
- Paste the command below in the Powershell console and press Enter.
Get-Package -Name “Microsoft .Net Framework*” | Uninstall-Package
- You may get a prompt to download and install a “nuget” package. Select Yes and follow the prompt.
Reinstall Microsoft .NET Framework
.NET Framework 4.8.1 is the latest framework version, and it’s pre-installed on Windows 11 devices. It (.NET Framework 4.8.1) supports the following Windows 10 versions:
- Windows 10 October 2018 Update (version 1809)
- Windows 10 April 2018 Update (version 1803)
- Windows 10 Fall Creators Update (version 1709)
- Windows 10 Creators Update (version 1703)
- Windows 10 Anniversary Update (version 1607)
- Windows Server 2019
- Windows Server, version 1809
- Windows Server, version 1803
- Windows Server 2016
The .NET Framework 4.8.1 doesn’t work in Windows 10 version 1507 and version 1511. Go to Settings > System > About to check what version of Windows 10 you have.
If your PC doesn’t support .NET Framework 4.8.1, update its operating system or install an older framework version.
- Visit the .NET Framework download page on the Microsoft website and expand the Supported versions drop-down section. Select the .NET Framework version you want to install on your computer.
- Scroll to the “Runtime” section and select Download .NET Framework Runtime to download the web installer.
Run the installer, follow the installation prompt, and reboot your computer. Re-enable the .NET Framework on your device if the problem persists.
Re-Enable .NET Framework Windows
You can manually fix .NET Framework errors by turning off the feature and turning it back on.
- Open the Control Panel and select Programs (or Programs and Features).
- Select Turn Windows features on or off.
- Uncheck the boxes next to all .NET Framework versions on the list and select OK.
- Select Restart now to reboot your computer.
- Open the Control Panel and check the box next to the .NET Frameworks you turned off earlier. Select OK to proceed.
- You may get a prompt to download files from Windows Update to complete the .NET Framework setup. Connect your computer to the internet and select Let Windows Update download the files for you.
Control Panel will download the files required to set up the .NET Framework on your computer. The download process takes about 10-25 minutes, depending on your internet speed and .NET Framework version(s).
- Select Restart now to reboot your computer and complete the setup process.
Run the System File Checker
The System File Checker (SFC) utility might fix corrupt .NET Framework installation in Windows. Run an SFC scan if the Microsoft .NET Framework Repair Tool doesn’t find or fix any problem.
Connect your PC to a Wi-Fi or Ethernet network and follow the steps below.
- Type cmd in the Windows search bar and run the Command Prompt app as an administrator.
- Type or paste DISM.exe /Online /Cleanup-image /Restorehealth in the console and press Enter.
- Next, paste sfc /scannow in the console and press Enter.
Get .NET Framework Patched Up
The Check Disk (CHKDSK) Utility is another tool that diagnoses and fixes file corruption in Windows. Learn how to fix file system errors with Check Disk Utility.
If an app continues to crash after repairing the .NET Framework, contact Microsoft Support or report the problem to the app developer.