💎一站式轻松地调用各大LLM模型接口,支持GPT4、智谱、星火、月之暗面及文生图 广告
[Windows有用的免费软件 含监控文件改变的免费软件](https://zhs.moo0.com/?top=https://zhs.moo0.com/software/FileMonitor/) 用管理员权限打开cmd,否则下面创建链接会失败 ![](https://img.kancloud.cn/0a/8c/0a8c5b48b06498b491bcde0e5922c3bd_513x272.png) 输入cmd后按Ctrl+Shift+Enter # Visual Studio 2022安装到非C盘 VS 2022之前的版本均为32位,其安装目录有以下几个: ``` C:\Program Files (x86)\Microsoft SDKs C:\Program Files (x86)\Microsoft Visual Studio C:\Program Files (x86)\Windows Kits C:\ProgramData\Microsoft\VisualStudio C:\ProgramData\Package Cache ``` 以安装到`D:\Visual Studio`目录为例,首先在该目录下创建`Microsoft SDKs, Microsoft Visual Studio, Windows Kits, VisualStudio, Package Cache`五个目录,然后按以下命令创建链接: ``` mklink /D "C:\Program Files (x86)\Microsoft SDKs" "D:\Visual Studio\Microsoft SDKs" mklink /D "C:\Program Files (x86)\Microsoft Visual Studio" "D:\Visual Studio\Microsoft Visual Studio" mklink /D "C:\Program Files (x86)\Windows Kits" "D:\Visual Studio\Windows Kits" mklink /D "C:\ProgramData\Microsoft\VisualStudio" "D:\Visual Studio\VisualStudio" mklink /D "C:\ProgramData\Package Cache" "D:\Visual Studio\Package Cache" ``` Visual Studio 2022之前的版本均为64位,其安装目录与之前版本不同,实测仅安装`C++`组件时用到了以下目录: ``` C:\Program Files (x86)\Microsoft SDKs C:\Program Files\Microsoft Visual Studio C:\Program Files (x86)\Microsoft Visual Studio C:\Program Files (x86)\Windows Kits C:\ProgramData\Microsoft\VisualStudio C:\ProgramData\Package Cache ``` 接下来按照相同的方法,先在目标位置创建目录,再用`mklink`创建链接。为防止安装其他组件时会用到其他目录,索性把`C:\Program Files\Microsoft SDKs, C:\Program Files (x86)\Windows Kits`也算上。 ``` mklink /D "C:\Program Files (x86)\Microsoft SDKs" "D:\Visual Studio\Microsoft SDKs" mklink /D "C:\Program Files (x86)\Microsoft Visual Studio" "D:\Visual Studio\Microsoft Visual Studio" mklink /D "C:\Program Files (x86)\Windows Kits" "D:\Visual Studio\Windows Kits" mklink /D "C:\Program Files\Microsoft SDKs" "D:\Visual Studio\Microsoft SDKs x64" mklink /D "C:\Program Files\Microsoft Visual Studio" "D:\Visual Studio\Microsoft Visual Studio x64" mklink /D "C:\Program Files\Windows Kits" "D:\Visual Studio\Windows Kits x64" mklink /D "C:\ProgramData\Microsoft\VisualStudio" "D:\Visual Studio\VisualStudio" mklink /D "C:\ProgramData\Package Cache" "D:\Visual Studio\ProgramData\Package Cache" ``` 其他组件用到的目录 ``` mklink /D "C:\ProgramData\Microsoft Visual Studio" "K:\Visual Studio\ProgramData\Microsoft Visual Studio" mklink /D "C:\Program Files\Android" "D:\Visual Studio\Android" mklink /D "C:\Program Files\Application Verifier" "D:\Visual Studio\Application Verifier" mklink /D "C:\Program Files\dotnet" "D:\Visual Studio\dotnet" mklink /D "C:\Program Files\IIS" "D:\Visual Studio\IIS" mklink /D "C:\Program Files\IIS Express" "D:\Visual Studio\IIS Express" mklink /D "C:\Program Files\Intel" "D:\Visual Studio\Intel" mklink /D "C:\Program Files\Microsoft" "D:\Visual Studio\Microsoft" mklink /D "C:\Program Files\Microsoft SQL Server" "D:\Visual Studio\Microsoft SQL Server" mklink /D "C:\Program Files\Microsoft Update Health Tools" "D:\Visual Studio\Microsoft Update Health Tools" mklink /D "C:\Program Files\Reference Assemblies" "D:\Visual Studio\Reference Assemblies" mklink /D "C:\Program Files\Unity Hub" "D:\Visual Studio\Unity Hub" mklink /D "C:\Program Files\VS2010Schemas" "D:\Visual Studio\VS2010Schemas" mklink /D "C:\Program Files\VS2012Schemas" "D:\Visual Studio\VS2012Schemas" mklink /D "C:\Program Files\Microsoft" "D:\Visual Studio\Microsoft" mklink /D "C:\Program Files (x86)\Android" "D:\Visual Studio\Android (x86)" mklink /D "C:\Program Files (x86)\Application Verifier" "D:\Visual Studio\Application Verifier (x86) mklink /D "C:\Program Files (x86)\dotnet" "D:\Visual Studio\dotnet (x86)" mklink /D "C:\Program Files (x86)\IIS" "D:\Visual Studio\IIS (x86)" mklink /D "C:\Program Files (x86)\IIS Express" "D:\Visual Studio\IIS Express (x86)" mklink /D "C:\Program Files (x86)\Microsoft ActiveSync" "D:\Visual Studio\Microsoft ActiveSync (x86) mklink /D "C:\Program Files (x86)\Microsoft SQL Server" "D:\Visual Studio\Microsoft SQL Server (x86) mklink /D "C:\Program Files (x86)\Microsoft Web Tools" "D:\Visual Studio\Microsoft Web Tools (x86)" mklink /D "C:\Program Files (x86)\MSBuild" "D:\Visual Studio\MSBuild (x86)" mklink /D "C:\Program Files (x86)\MSECache" "D:\Visual Studio\MSECache (x86)" mklink /D "C:\Program Files (x86)\NuGet" "D:\Visual Studio\NuGet (x86)" mklink /D "C:\Program Files (x86)\Open XML SDK" "D:\Visual Studio\Open XML SDK (x86)" mklink /D "C:\Program Files (x86)\Reference Assemblies" "D:\Visual Studio\Reference Assemblies (x86)" mklink /D "C:\Program Files (x86)\Workflow Manager Tools" "D:\Visual Studio\Workflow Manager Tools (x86)" mklink /D "C:\Program Files (x86)\Xamarin" "D:\Visual Studio\Xamarin (x86)" ``` [Visual Studio 官网下载](https://visualstudio.microsoft.com/zh-hans/downloads/)安装