[Unity]visualstudiotoolsforunity.vstuc requested to download the .NET Runtime.

2024-07-21 1201阅读

问题

用vscode打开unity脚本时出现visualstudiotoolsforunity.vstuc requested to download the .NET Runtime.的错误,写代码时不出现提示。

原因

该问题是由于unity中c#相关插件找不到对应的.net版本导致的[Unity]visualstudiotoolsforunity.vstuc requested to download the .NET Runtime.

解决方法

在上方搜索栏中搜索setting.json

其中加入

"dotnetAcquisitionExtension.existingDotnetPath": [
    {
        "extensionId": "visualstudiotoolsforunity.vstuc",
        "path": "C:\\Program Files\\dotnet\\dotnet.exe",
        
    },
    {
        "extensionId": "ms-dotnettools.csharp",
        "path": "C:\\Program Files\\dotnet\\dotnet.exe"
    },
    {
        "extensionId": "ms-dotnettools.csdevkit",
        "path": "C:\\Program Files\\dotnet\\dotnet.exe"
    }
    
],

若出现

[Unity]visualstudiotoolsforunity.vstuc requested to download the .NET Runtime.

正常情况下好了。

但若是右下角出现了红色警告,并且还是没有提示

打开提示,会发现需要的是.net 8.0,提示中会有链接 去下一个.net runtime 8.0就好了

.net 8.0下载地址 

VPS购买请点击我

文章版权声明:除非注明,否则均为主机测评原创文章,转载或复制请以超链接形式并注明出处。

目录[+]