简体   繁体   English

即使在安装 .NET 核心 SDK 后,Dotnet 命令也不起作用

[英]Dotnet commands not working even after installing .NET core SDK

I am trying to setup visual studio code for c# on Manjaro Linux我正在尝试在 Manjaro Linux 上为 c# 设置 Visual Studio 代码

  • I have installed VSC and .NET core 5.0 SDK through the package manager.我已经通过包管理器安装了 VSC 和 .NET core 5.0 SDK。

  • The c# add-on is installed in VSC C# 插件安装在 VSC 中

With all of these installed correctly, why can't I use the dotnet command in the terminal?正确安装所有这些后,为什么我不能在终端中使用 dotnet 命令?

Every time I try I get this error;每次我尝试时都会收到此错误; sh: dotnet: command not found

By default, dotnet is installed to usr/share/dotnet .默认情况下, dotnet安装到usr/share/dotnet Check if this path is added to the env var $PATH .检查此路径是否已添加到 env var $PATH

If you can't find it there, you could run on a terminal:如果你在那里找不到它,你可以在终端上运行:

whereis dotnet

If no dotnet is found, the tool wasn't properly installed.如果未找到 dotnet,则该工具未正确安装。

Also, did you close and reopen the terminal window after installing the SDK, as the instructions stated ?另外,您是否按照说明在安装 SDK 后关闭并重新打开终端窗口?

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 在安装 .NET Core Runtime 和 SDK 后需要重新启动服务器吗? - In sever restart required after installing .NET Core Runtime and SDK? 在Windows服务器上运行Vanilla ASP.NET-Core网站会收到消息“你的意思是运行dotnet SDK命令” - Running Vanilla ASP.NET-Core website on windows server get message “Did you mean to run dotnet SDK commands” dotnet ef 在最新的 SDK 更新后不起作用 - dotnet ef not working after the latest SDK is updated “dotnet ef”命令在 .NET Core 2.2 中不起作用 - 'dotnet ef' command is not working in .NET Core 2.2 安装 .NET SDK 5.0 后,我还应该安装 .NET Core 吗? - After Installing .NET SDK 5.0, should I also install .NET Core? 安装的 .NET 6.0 SDK 未显示 dotnet --info 或 dotnet --list-sdks 以及依赖于 SDK 的命令失败(Linux/Ubuntu) - Installed .NET 6.0 SDKs not showing with dotnet --info or dotnet --list-sdks and commands depeding on SDK fail (Linux/Ubuntu) 如何使用 Docker.DotNet (NET CORE) 连接到工作容器 - How to attach to working container with Docker.DotNet (NET CORE) dotnet 核心配置绑定不起作用 - dotnet core configuration binding not working 在 dotnet core SDK 版本之间切换 - Switch between dotnet core SDK versions Sentry SDK dotnet core 不使用 IUserFactory - Sentry SDK dotnet core not using IUserFactory
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM