Как настроить код Visual Studio для использования инструментов Visual Studio Professional 2019 без .NET SDK в PATH?C#

Место общения программистов C#
Ответить Пред. темаСлед. тема
Anonymous
 Как настроить код Visual Studio для использования инструментов Visual Studio Professional 2019 без .NET SDK в PATH?

Сообщение Anonymous »

У меня установлена ​​Visual Studio Professional 2019:

Код: Выделить всё

C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\Common7\IDE\devenv.com
C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\MSBuild\Current\Bin\amd64\MSBuild.exe
C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\MSBuild\Current\Bin\Roslyn\csc.exe
Когда я открываю папку проекта из командной строки с помощью кода ., я получаю следующий вывод в Visual Studio Code:

Код: Выделить всё

Starting Spawn .NET server...
Starting opening a solution...
Starting processing the solution file "path\to\file.sln" in Dev Kit server...
Failed to find dotnet from path with "where.exe dotnet".
Cannot find .NET SDK installation from PATH environment. C# DevKit extension would not work without a proper installation of the .NET SDK accessible through PATH environment. Rebooting might be necessary in some cases. Check the PATH environment logged in the C# DevKit logging window. In some cases, it could be affected how VS code was started.
PATH=C:\Windows\System32\;C:\Users\%USERNAME%\AppData\Local\Programs\Microsoft VS Code\bin\;C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\Common7\IDE\;C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\MSBuild\Current\Bin\amd64\;C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\MSBuild\Current\Bin\Roslyn\;C:\ProgramData\chocolatey\bin\;C:\Program Files\Git\cmd\;C:\Program Files\TortoiseSVN\bin\;C:\Windows\System32\WindowsPowerShell\v1.0\;
Using local .NET runtime at "c:\Users\%USERNAME%\AppData\Roaming\Code\User\globalStorage\ms-dotnettools.vscode-dotnet-runtime\.dotnet\8.0.8~x64~aspnetcore\dotnet.exe"
.NET server started and IPC established in 1003ms
Completed Spawn .NET server (1858ms)
Completed processing the solution file "path\to\file.sln" in Dev Kit server (2442ms)
Starting restoring NuGet packages...
Selected configuration: , active configuration: Debug|Any CPU
Completed opening a solution (2471ms)
Starting command: "dotnet.exe" restore path\to\file.sln --interactive...
Failed to monitor project loading status.
Starting Query for all projects...
Failed at 'Query for all projects' (38ms) with error: Error: Exception while talking to proxy: Error: One or more errors occurred. (No installed .NET SDK was found on the computer. If it is installed, make sure it can be found through the PATH environment variable.)
Я хочу знать, как можно диагностировать и решить проблему, желательно с помощью файлов JSON, в первую очередь файла .vscode/settings.json. Я не хочу использовать dotnet.exe. Я думаю, мне нужно найти «.NET SDK», который входит в состав Visual Studio Professional 2019.


Подробнее здесь: https://stackoverflow.com/questions/790 ... 2019-tools
Реклама
Ответить Пред. темаСлед. тема

Быстрый ответ

Изменение регистра текста: 
Смайлики
:) :( :oops: :roll: :wink: :muza: :clever: :sorry: :angel: :read: *x)
Ещё смайлики…
   
К этому ответу прикреплено по крайней мере одно вложение.

Если вы не хотите добавлять вложения, оставьте поля пустыми.

Максимально разрешённый размер вложения: 15 МБ.

  • Похожие темы
    Ответы
    Просмотры
    Последнее сообщение

Вернуться в «C#»