英文:
VSCode timeout error when download dotnet runtime v7.0.9
问题
我的vscode在尝试下载dotnet runtime v7.0.9时遇到超时错误
> 正在下载.NET Runtime。
> 正在下载.NET版本 7.0.9 .......................................................................................................................... 错误!
> 无法下载.NET 7.0.9:
> .NET安装超时。
>
> 错误!
> .NET获取失败:安装失败:错误:.NET安装超时。
而且C#的智能功能不起作用,我的C#输出是
> [错误 - 2:06:46 AM] Microsoft.CodeAnalysis.LanguageServer客户端:无法创建与服务器的连接。
> 错误:无法解析dotnet路径!
> 在t.DotnetRuntimeExtensionResolver.<anonymous> (c:\Users\Jaam-e-Jam.vscode\extensions\ms-dotnettools.csharp-2.0.249-win32-x64\dist\extension.js:2:1009858)处
> 在生成器.next (<anonymous>)处
> 在s (c:\Users\Jaam-e-Jam.vscode\extensions\ms-dotnettools.csharp-2.0.249-win32-x64\dist\extension.js:2:1008463)处
我搜索了一下网络,然后将它设置到setting.json文件中
"dotnetAcquisitionExtension.existingDotnetPath": [
{
"extensionId": "ms-dotnettools.csdevkit",
"path": "C:\\Program Files\\dotnet\\dotnet.exe"
},
{
"extensionId": "ms-dotnettools.vscodeintellicode-csharp",
"path": "C:\\Program Files\\dotnet\\dotnet.exe"
},
{
"extensionId": "ms-dotnettools.csharp",
"path": "C:\\Program Files\\dotnet\\dotnet.exe"
},
{
"extensionId": "ms-dotnettools.vscode-dotnet-runtime",
"path": "C:\\Program Files\\dotnet\\dotnet.exe"
}
]
但对于每个项目我都必须设置它!我该如何修复这个问题?
英文:
My vscode when want to download dotnet runtime v7.0.9 get error time out
> Downloading the .NET Runtime.
> Downloading .NET version(s) 7.0.9 .......................................................................................................................... Error!
> Failed to download .NET 7.0.9:
> .NET installation timed out.
>
> Error!
> .NET Acquisition Failed: Installation failed: Error: .NET installation timed out.
and intelligence of C# doesnot work and my C# output is
> [Error - 2:06:46 AM] Microsoft.CodeAnalysis.LanguageServer client: couldn't create connection to server.
> Error: Could not resolve the dotnet path!
> at t.DotnetRuntimeExtensionResolver.<anonymous> (c:\Users\Jaam-e-Jam.vscode\extensions\ms-dotnettools.csharp-2.0.249-win32-x64\dist\extension.js:2:1009858)
> at Generator.next (<anonymous>)
> at s (c:\Users\Jaam-e-Jam.vscode\extensions\ms-dotnettools.csharp-2.0.249-win32-x64\dist\extension.js:2:1008463)
I Search the net and I set it to setting.json file
"dotnetAcquisitionExtension.existingDotnetPath": [
{
"extensionId": "ms-dotnettools.csdevkit",
"path": "C:\\Program Files\\dotnet\\dotnet.exe"
},
{
"extensionId": "ms-dotnettools.vscodeintellicode-csharp",
"path": "C:\\Program Files\\dotnet\\dotnet.exe"
},
{
"extensionId": "ms-dotnettools.csharp",
"path": "C:\\Program Files\\dotnet\\dotnet.exe"
},
{
"extensionId": "ms-dotnettools.vscode-dotnet-runtime",
"path": "C:\\Program Files\\dotnet\\dotnet.exe"
}
]
but for each project i must to set it!
How can i fix it?
答案1
得分: 2
"dotnetAcquisitionExtension.existingDotnetPath": [
{
"extensionId": "ms-dotnettools.csdevkit",
"path": "C:\\Program Files\\dotnet\\dotnet.exe"
},
{
"extensionId": "ms-dotnettools.vscodeintellicode-csharp",
"path": "C:\\Program Files\\dotnet\\dotnet.exe"
},
{
"extensionId": "ms-dotnettools.csharp",
"path": "C:\\Program Files\\dotnet\\dotnet.exe"
},
{
"extensionId": "ms-dotnettools.vscode-dotnet-runtime",
"path": "C:\\Program Files\\dotnet\\dotnet.exe"
}
]
以上代码有用,并且是答案,但我们需要将其写入以下地址:
%APPDATA%\Code\User\settings.json
感谢 @LexLi 提供的信息。
英文:
"dotnetAcquisitionExtension.existingDotnetPath": [
{
"extensionId": "ms-dotnettools.csdevkit",
"path": "C:\\Program Files\\dotnet\\dotnet.exe"
},
{
"extensionId": "ms-dotnettools.vscodeintellicode-csharp",
"path": "C:\\Program Files\\dotnet\\dotnet.exe"
},
{
"extensionId": "ms-dotnettools.csharp",
"path": "C:\\Program Files\\dotnet\\dotnet.exe"
},
{
"extensionId": "ms-dotnettools.vscode-dotnet-runtime",
"path": "C:\\Program Files\\dotnet\\dotnet.exe"
}
]
Above code is usefull and is answer but we need write it in this Address
%APPDATA%\Code\User\settings.json
Thanks a lot from @LexLi
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论