visual-studio-2022 - 从开发人员 Powershell 运行 dotnet 命令时,Visual Studio 2022 打开 "How do you want to open this file"

标签 visual-studio-2022 dotnet-cli

在 Developer Powershell 或 Visual Studio 2022 IDE 中的终端中执行 dotnet 命令会弹出“您希望如何打开此文件”对话框,而不是执行 dotnet 命令。

我安装了 Visual Studio 2022 以及 dotnet 3 和 7 sdks。 我可以在新的命令窗口中执行 dotnet 命令 例如

enter image description here

但是当我在 Visual Studio 中的 Developer Powershell 窗口或终端中尝试相同的命令时,我会收到一个对话框,询问“您希望如何打开此文件”,而不是执行命令: enter image description here

关于如何纠正这个问题有什么想法吗?

最佳答案

我已经解决了这个问题。由于某种原因,我的 C:\Windows\System32 文件夹中有一个 dotnet 文件。我删除了它,瞧。任何人都猜测它是如何到达那里的。

关于visual-studio-2022 - 从开发人员 Powershell 运行 dotnet 命令时,Visual Studio 2022 打开 "How do you want to open this file",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/75739972/

相关文章:

c# - .NET 6 发布 Android 应用程序

console-application - 您如何在 .net 核心控制台应用程序中存储用户应用程序数据

.net - 在 dotnet run 解决方案中设置默认项目

c# - 如何使用 dotnet sln 将所有项目添加到单个解决方案?

c# - Visual Studio 2022 - 嵌套部分类(文件)

c# - Visual Studio 2022 如何仅在选项卡上自动完成?

visual-studio - 调试 ASP.Net 应用程序时 Visual Studio 未启动浏览器

c# - 由于 XmlSerialization (sgen.exe) 无法在 Visual Studio 2022 中构建项目并且无法禁用

.net - 使用 ftp Github Actions 发布和部署 dotnet

nuget - project.json 指定 NuGet 依赖项的确切版本