windows10安装.net framework3.5
win10默认支持netframework4.7版本,但安装一些基于net framwork3.5开发的软件时会要求安装该版本,但系统自动安装结果一直为failed。只能通过手动安装来解决,最快的解决方式参考了
https://winaero.com/blog/offline-install-of-net-framework-3-5-in-windows-10-using-dism/
如果有win10安装的iso文件,直接用ultraiso挂载到虚拟光驱
然后使用dism命令安装就能解决,为了方便,上链接提供了一个bat脚本可以快速解决
@echo off
Title .NET Framework 3.5 Offline Installer
for %%I in (D E F G H I J K L M N O P Q R S T U V W X Y Z) do if exist "%%I:\\sources\install.wim" set setupdrv=%%I
if defined setupdrv (
echo Found drive %setupdrv%
echo Installing .NET Framework 3.5...
Dism /online /enable-feature /featurename:NetFX3 /All /Source:%setupdrv%:\sources\sxs /LimitAccess
echo.
echo .NET Framework 3.5 should be installed
echo.
) else (
echo No installation media found!
echo Insert DVD or USB flash drive and run this file once again.
echo.
)
pause
将上述代码保存到一个txt文件中后,将该txt文件扩展名从.txt修改为.bat后,右键以管理员身份运行,即可自动添加.net framework3.5
验证是否安装成功
对应版本前打钩代表已经安装成功!