問題描述
安裝VS時更改了安裝目錄,導(dǎo)致Visual Stuodio Installer
無法識別到已經(jīng)安裝VS
解決方法
只可以在下載緩存還存在的情況下才能使用下面的方法
-
找到 Installer 的安裝目錄
–C:\Program Files (x86)\Microsoft Visual Studio\Installer\setup.exe
–C:\Program Files (x86)\Microsoft Visual Studio\Installer\vs_installershell.exe
-
找到 VS 主程序 的上三級目錄
–D:\Microsoft Visual Studio\2019\Community\Common7\IDE\devenv.exe
–D:\Microsoft Visual Studio\2019\Community
-
然后進(jìn)入Installer 的安裝目錄, 打開
cmd/powershell
執(zhí)行下面的命令
.\vs_installershell.exe repair --installPath="D:\Microsoft Visual Studio\2019\Community"
其他
- Visual Studio Installer 找不到已安裝產(chǎn)品
- installpath 指向 下載VS時的緩存目錄,如果刪除了,只能重新下載
- 更改注冊表路徑
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\Setup\cachepath
Visual Studio Installer 其他的修復(fù)功能, 可以輸入下面的命令查看文章來源:http://www.zghlxwxcb.cn/news/detail-440712.html
.\vs_installershell.exe repair
文章來源地址http://www.zghlxwxcb.cn/news/detail-440712.html
正確安裝
- 在
Installer
中下載緩存
這項必須保留,否則無法識別Visual Studio,需要更新組件時只能重新下載VS - 安裝完成后請保留此文件夾,不要進(jìn)行刪除
- 以下目錄可以刪除,初次安裝時有安裝包放在這目錄里
C:\Package Cache
C:\Users\NueXini\AppData\Local\Package Cache
- 相關(guān)鏈接
- https://learn.microsoft.com/en-us/visualstudio/install/uninstall-visual-studio?view=vs-2022
- https://github.com/MicrosoftDocs/visualstudio-docs/blob/main/docs/install/uninstall-visual-studio.md
- https://learn.microsoft.com/en-us/answers/questions/645813/how-to-completely-uninstall-and-remove-all-related
到了這里,關(guān)于解決Visual Stuodio Installer無法識別已經(jīng)安裝Visual Studio問題的文章就介紹完了。如果您還想了解更多內(nèi)容,請在右上角搜索TOY模板網(wǎng)以前的文章或繼續(xù)瀏覽下面的相關(guān)文章,希望大家以后多多支持TOY模板網(wǎng)!