Loading

DotNetCore 3.1桌面应用在Windows 7 SP1 X86下不能运行的问题的解决方法

遇到的问题

一个小的桌面应用,发布到Windows 7 SP1 x86系统,打包成Self-Contained进行发布的时候,运行后没反应,也不报错。打包成SingleFile之后,运行报错 api-ms-win-crt-runtime-l1-1-0.dll 缺失。之后尝试安装.Net Core 3.1的Desktop Runtime,问题依旧。然后又搜索一阵,大概是Windows 7 SP1系统里面,正常运行 .Net Core 3.1的应用,需要额外安装两个软件包:

  • Microsoft Visual C++ 2015-2019 Redistributable 64 位 / 32 位
  • KB3063858 64 位 / 32 位
  • Microsoft 根证书颁发机构 2011(仅限 .NET Core 2.1 脱机安装程序)【安装上面两个之后,程序正常运行了,这个没管它】

安装完之后,再运行就没问题了😂

参考资料

Windows 7 安装 .NET 5 / .NET Core 3.1 环境的方法和依赖文件
https://www.coderbusy.com/archives/798.html

探索 dotnet core 为何在 Windows7 系统需要补丁的原因
https://www.cnblogs.com/lindexi/p/15768396.html

官方文档
https://learn.microsoft.com/zh-cn/dotnet/core/install/windows?tabs=netcore31#windows-7--vista--81--server-2008-r2--server-2012-r2

软件包下载

Microsoft Visual C++ Redistributable for Visual Studio 2022
https://visualstudio.microsoft.com/zh-hans/downloads/
https://aka.ms/vs/17/release/VC_redist.x86.exe
https://aka.ms/vs/17/release/VC_redist.x64.exe

Microsoft Visual C++ Redistributable for Visual Studio 2019
https://aka.ms/vs/16/release/vc_redist.x64.exe
https://aka.ms/vs/16/release/vc_redist.x86.exe

系统更新KB3063858
64位
https://www.microsoft.com/download/details.aspx?id=47442
https://download.microsoft.com/download/0/8/E/08E0386B-F6AF-4651-8D1B-C0A95D2731F0/Windows6.1-KB3063858-x64.msu

32位
https://www.microsoft.com/download/details.aspx?id=47409
https://download.microsoft.com/download/C/9/6/C96CD606-3E05-4E1C-B201-51211AE80B1E/Windows6.1-KB3063858-x86.msu

posted @ 2024-12-25 09:04  asashadow  阅读(213)  评论(0)    收藏  举报