一、概述
因为桌面项目涉及一些老用户,需要兼容win7 sp1,.net6文档是说可以支持win7 sp1(安装扩展安全更新后支持 Windows 7 SP1 )及以上版本的,所以进一步验证一下并记录其过程。.net 支持的操作系统策略
- Red Hat Enterprise Linux 7.2
- CentOS 7.1+
- Debian 8.2+
- Fedora 23
- Linux Mint 17.1
- OpenSUSE 13.2
- Oracle Linux 7.1
- Ubuntu 14.04 & 16.04
- Mac OS X 10.11
- Windows 7 SP1 + / Windows Server 2008 R2 SP1 +
- Windows Nano Server TP5
二、环境
系统:win7 sp1
.net core:.net 6.0.4
三、运行验证
1、安装.net 6 SDK
一步到位,顺利安装。[]()
2、创建项目
dotnet new webapi
a)、提示计算机中丢失 api-ms-win-crt-runtime-l1-1-0.dll
b)、错误信息
Failed to load the dll from [C:\Program Files\dotnet\host\fxr\6.0.24\hostfxr.dll], HRESULT: 0x80070057
The library hostfxr.dll was found, but loading it from C:\Program Files\dotnet\host\fxr\6.0.24\hostfxr.dll failed
- Installing .NET prerequisites might help resolve this problem.
https://go.microsoft.com/fwlink/?linkid=798306
解决:根据链接地址中先决条件提示安装安全更新程序(需要重启系统) - KB3063858 64 位 / 32 位
3、编译项目
dotnet build
如果出现访问index.json失败,需要配置静态id及dns,并且重启cmd
4、运行
dotnet run
能够正常运行访问
四、总结
Windows版本运行.net core 依赖条件
- Microsoft Visual C++ 2015-2019 Redistributable 64 位 / 32 位
- KB3063858 64 位 / 32 位
- Microsoft 根证书颁发机构 2011(仅限 .NET Core 2.1 脱机安装程序)
Comments NOTHING