当 运行 在 VSCode 远程开发容器中时,如何让 VSCode Liveshare 扩展正常工作
How to get VSCode Liveshare extension working when running inside VSCode Remote Dev Container
在 devContainer
实例中安装 LiveShare 扩展时出现错误。
例如使用:https://github.com/microsoft/vscode-remote-try-go/ 然后将扩展名添加到 devcontainer.json
文件
"extensions": [
"ms-vscode.go",
"ms-vsliveshare.vsliveshare-pack"
]
当我尝试开始直播时,我看到:
Agent terminated with exit code: 0 and signal null: FailFast: Couldn't find a valid ICU package installed on the system. Set the configuration flag System.Globalization.Invariant to true if you want to run with no globalization support.at System.Environment.FailFast(System.String) at System.Globalization.GlobalizationMode.GetGlobalizationInvariantMode() at System.Globalization.GlobalizationMode..cctor() at System.Globalization.CultureData.CreateCultureWithInvariantData() at System.Globalization.CultureData.get_Invariant() at System.Globalization.CultureInfo..cctor() at System.StringComparer..cctor() at System.AppDomain.InitializeCompatibilityFlags() at System.AppDomain.Setup(System.Object)Aborted (core dumped)
事实证明,这需要 docker 图像来安装 icu
工具,然后事情就会按预期运行。
对于我添加的 golang
图片:
RUN apt update && apt install icu-devtools -y
重建容器并且一切正常。
需要注意的一件事是,您需要使用替代登录流程,使用代码登录
在 devContainer
实例中安装 LiveShare 扩展时出现错误。
例如使用:https://github.com/microsoft/vscode-remote-try-go/ 然后将扩展名添加到 devcontainer.json
文件
"extensions": [
"ms-vscode.go",
"ms-vsliveshare.vsliveshare-pack"
]
当我尝试开始直播时,我看到:
Agent terminated with exit code: 0 and signal null: FailFast: Couldn't find a valid ICU package installed on the system. Set the configuration flag System.Globalization.Invariant to true if you want to run with no globalization support.at System.Environment.FailFast(System.String) at System.Globalization.GlobalizationMode.GetGlobalizationInvariantMode() at System.Globalization.GlobalizationMode..cctor() at System.Globalization.CultureData.CreateCultureWithInvariantData() at System.Globalization.CultureData.get_Invariant() at System.Globalization.CultureInfo..cctor() at System.StringComparer..cctor() at System.AppDomain.InitializeCompatibilityFlags() at System.AppDomain.Setup(System.Object)Aborted (core dumped)
事实证明,这需要 docker 图像来安装 icu
工具,然后事情就会按预期运行。
对于我添加的 golang
图片:
RUN apt update && apt install icu-devtools -y
重建容器并且一切正常。
需要注意的一件事是,您需要使用替代登录流程,使用代码登录