无法在PowerShell(管理员)中执行Visual Studio引导程序VS_Community ity.exe,并收到错误“无法识别...”

mwecs4sa  于 2022-11-10  发布在  Shell
关注(0)|答案(1)|浏览(129)

我正尝试在PowerShell(Admin)中执行用于Visual Studio 2022版本的引导程序vs_Community ity.exe,以创建用于在另一台计算机上脱机安装的本地布局。
我听从微软的指示:https://learn.microsoft.com/en-us/visualstudio/install/create-an-offline-installation-of-visual-studio?view=vs-2022

vs_community.exe --layout c:\localVSlayout --add Microsoft.VisualStudio.Workload.ManagedDesktop --add Microsoft.VisualStudio.Workload.NetWeb --includeOptional --lang en-US

PowerShell返回错误:

vs_community.exe : The term 'vs_community.exe' is not recognized as the name of a cmdlet, function, script file, or ope
rable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again
.
At line:1 char:1
+ vs_community.exe --layout c:\localVSlayout --add Microsoft.VisualStud ...
+ ~~~~~~~~~~~~~~~~
   + CategoryInfo          : ObjectNotFound: (vs_community.exe:String) [], CommandNotFoundException
   + FullyQualifiedErrorId : CommandNotFoundException

如何正确执行VS_Community ity.exe?

ruarlubt

ruarlubt1#

确保当前目录中存在VS_CLOBITY.EXE,然后尝试使用.\VS_COMERITY.EXE而不是VS_COMERITY.EXE。这对我很管用。

相关问题