该系统找不到在开发人员命令提示中指定的文件,vs 2022
运行 VS 2022 的开发人员命令提示符
以前,我没有收到此错误。
尝试使用管理员修改快捷方式启动器后,会发生此错误。回滚启动器的路径和命令,保留此错误。
**********************************************************************
** Visual Studio 2022 Developer Command Prompt v17.1.3
** Copyright (c) 2022 Microsoft Corporation
**********************************************************************
The system cannot find the file specified.
C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools>
如何解决这个问题?
我已阅读此 SO 答案,但就我而言,已经没有 AutoRun
。
从cmd打开.bat
文件也不起作用。
PS C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\Common7\Tools> VsDevCmd.bat
**********************************************************************
** Visual Studio 2022 Developer Command Prompt v17.1.3
** Copyright (c) 2022 Microsoft Corporation
**********************************************************************
The system cannot find the file specified.
Running Developer Command Prompt for VS 2022
Previously, I didn't get this error.
After try some attempt modifying the shortcut launcher using administrator, this error happens. Roll back the path and command for the launcher, keeps this error.
**********************************************************************
** Visual Studio 2022 Developer Command Prompt v17.1.3
** Copyright (c) 2022 Microsoft Corporation
**********************************************************************
The system cannot find the file specified.
C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools>
How to fix this?
I've read this SO Answer but, in my case, there is already no AutoRun
.
Open the .bat
file from cmd also did not work.
PS C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\Common7\Tools> VsDevCmd.bat
**********************************************************************
** Visual Studio 2022 Developer Command Prompt v17.1.3
** Copyright (c) 2022 Microsoft Corporation
**********************************************************************
The system cannot find the file specified.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
修改
和修复
来自Visual Studio构建工具
解决问题。确保在此处显示一些可选下载: (如果您不能打开Imgur,则是 image )。
请参阅此vscode教程 page 在安装Visual Studio构建工具上。
Modify
andRepair
fromVisual Studio Build Tools
solve the problem.Make sure to check some optional download shown here:(if you can't open imgur, here is the image).
See this VSCode tutorial page on installing Visual Studio Build Tools.
我发现安装 Visual Studio Community 2022 选择以下软件包可以修复此问题:
他们还尝试硬塞他们的 Windows Copilot...但您可以禁用该软件包。
I found that installing the Visual Studio Community 2022 selecting the following packages fixes it:
They also try to shoehorn their Windows Copilot... but you can disable that package.
我认为op启动了vs Build Tools 2022的正确文件。
正确的文件将是
auginder-vsdevshell.ps1
:上面的控制台来自我的Windows 2022服务器,其中安装了VS Build Tools 2022。
另外,请注意,您也可以使用此官方的PowerShell模块从Microsoft中找到来自Microsoft的 VS构建工具:
I don't think OP launched the correct file for VS Build Tools 2022.
The correct one would be
Launch-VsDevShell.ps1
:The console above is from my Windows 2022 server with VS Build Tools 2022 installed.
Also, observe that you can also use this official PowerShell module from Microsoft to find the installation directory of the VS Build Tools: