我正在尝试使用 Microsoft 的 VSCode Live Share 扩展,但每次尝试启动时都会引发此错误:
[2022-01-26 21:23:06.492] [exthost] [error] Error: Agent terminated with exit code: 0 and signal null:
A fatal error occurred. The required library hostfxr.dll could not be found.
If this is a self-contained application, that library should exist in [c:\Users\Leonardo\.vscode\extensions\ms-vsliveshare.vsliveshare-1.0.5273\dotnet_modules\].
If this is a framework-dependent application, install the runtime in the global location [C:\Program Files (x86)\dotnet] or use the DOTNET_ROOT(x86) environment variableto specify the runtime location or register the runtime location in [HKLM\SOFTWARE\dotnet\Setup\InstalledVersions\x86\InstallLocation].The .NET Core runtime can be found at:
-https://aka.ms/dotnet-core-applaunch?missing_runtime=true&arch=x86&rid=win81-x86
at ChildProcess.<anonymous> (c:\Users\Leonardo\.vscode\extensions\ms-vsliveshare.vsliveshare-1.0.5273\src\abstractions\node\agent.ts:291:32)
at ChildProcess.emit (events.js:327:22)
at maybeClose (internal/child_process.js:1048:16)
at Socket.<anonymous> (internal/child_process.js:439:11)
at Socket.emit (events.js:315:20)
at Pipe.<anonymous> (net.js:673:12)
我安装了 .NET Runtime 和 SDK,dotnet
在终端中使用也可以正常工作。DOTNET_ROOT 环境变量设置为与which dotnet
返回相同的内容。
对此有什么想法吗?