简体   繁体   English

是否可以在 Windows 7 Embedded 上运行 .NET core 3.1 应用程序?

[英]Is it possible to run a .NET core 3.1 app on Windows 7 Embedded?

I am trying to run a .NET Core 3.1 WPF application on a Windows 7 Embedded VM.我正在尝试在 Windows 7 Embedded VM 上运行 .NET Core 3.1 WPF 应用程序。 Unfortunately, Windows 7 Embedded does not officially support .NET Core.不幸的是,Windows 7 Embedded 不正式支持 .NET Core。 Is there a workaround to get this to work anyway?无论如何,是否有解决方法可以使其正常工作?

I have already tried publishing the app as a self-contained package, and as a single file (which is also self-contained), hoping that this would include all the necessary dependencies.我已经尝试将应用程序发布为自包含包和单个文件(也是自包含的),希望这将包含所有必要的依赖项。 But unfortunately, this didn't work.但不幸的是,这并没有奏效。 The event viewer showed me this exception:事件查看器向我展示了这个异常:

Message: Failed to load the dll from (path)\hostfxr.dll, HRESULT:0x80070057
The library hostfxr.dll was found, but loading it from (path)\hostfxr.dll failed
- Installing .NET Core prerequisites might help resolve this problem.
  (download link)

But of course that installer does not work on Windows 7 embedded ("This update is not applicable to your computer").但是,该安装程序当然不适用于嵌入式 Windows 7(“此更新不适用于您的计算机”)。

Is there a way to manually include all necessary dependencies, to get this to load anyway?有没有办法手动包含所有必要的依赖项,无论如何都要加载它?

I had the same error regarding hostfxr.dll while starting from a barebones Windows 7 installation.从准系统 Windows 7 安装开始时,我遇到了关于 hostfxr.dll 的相同错误。 Microsoft lists a specific security patch that fixed the error once I installed it. Microsoft 列出了一个特定的安全补丁,在我安装后修复了该错误。

KB3063858 KB3063858

64-bit: https://www.microsoft.com/download/details.aspx?id=47442 64 位: https : //www.microsoft.com/download/details.aspx?id=47442
32-bit: https://www.microsoft.com/download/details.aspx?id=47409 32 位: https : //www.microsoft.com/download/details.aspx?id=47409

.Net 5/Core Dependencies .Net 5/核心依赖
https://docs.microsoft.com/en-us/dotnet/core/install/windows?tabs=net50#dependencies https://docs.microsoft.com/en-us/dotnet/core/install/windows?tabs=net50#dependencies

.Net 5/Core Dependencies .Net 5/核心依赖

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM