ch0 ide
Visual Studio使用 离线安装包 在页面 [4] 下载安装引导命令,下载完成后使用命令(对于C++来说) bat 1 vs_Professional.exe --layout 1111 --add Microsoft.VisualStudio.Workload.NativeDesktop --includeRecommended --lang en-US zh-CN 随后会触发下载,等待下载完成后,在 --layout 指定的目录上点击 vs_setup 开始离线安装。 Note: 对于完全脱离C盘安装可以使用下面的脚本,更改变量为要安装的路径 bat 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 :: 关闭终端回显 @echo off SET ROOT_PATH=D:\Program Files\Microsoft Visual Studio SET X86_PATH=%ROOT_PATH%\Program Files (x86) SET X86_VS_PATH=%X86_PATH%\Microsoft Visual Studio SET X86_SDK_PATH=%X86_PATH%\Microsoft SDKs SET X86_KITS_PATH=%X86_PATH%\Windows Kits SET X86_AV_PATH=%X86_PATH%\Application Verifier SET X64_PATH=%ROOT_PATH%\Program Files rem SET X64_VS_PATH=%X64_PATH%\Microsoft Visual Studio SET X64_AV_PATH=%X64_PATH%\Application Verifier SET X64_SQL_PATH=%X64_PATH%\Microsoft SQL Server SET PD_PATH=%ROOT_PATH%\ProgramData SET PD_VS_PATH=%PD_PATH%\Microsoft\VisualStudio SET PD_PC_PATH=%PD_PATH%\Package Cache @echo =======link directory to %ROOT_PATH%=======: SET S_X86_SKD_PATH=C:\Program Files (x86)\Microsoft SDKs SET S_X86_VS_PATH=C:\Program Files (x86)\Microsoft Visual Studio SET S_X86_KITS_PATH=C:\Program Files (x86)\Windows Kits SET S_X86_AV_PATH=C:\Program Files (x86)\Application Verifier SET S_X64_AV_PATH=C:\Program Files\Application Verifier SET S_X64_SQL_PATH=C:\Program Files\Microsoft SQL Server SET S_PD_VS_PATH=C:\ProgramData\Microsoft\VisualStudio SET S_PD_PC_PATH=C:\ProgramData\Package Cache pause @echo =======setting visual studio environment=======: @echo =======check directory exist=======: if not exist %ROOT_PATH% ( echo "%ROOT_PATH%目录不存在,已创建该目录!" md "%ROOT_PATH%" ) if not exist %X86_PATH% ( echo "%X86_PATH%目录不存在,已创建该目录!" md "%X86_PATH%" ) if not exist %X86_VS_PATH% ( echo "%X86_VS_PATH%目录不存在,已创建该目录!" md "%X86_VS_PATH%" ) if not exist %X86_SDK_PATH% ( echo "%X86_SDK_PATH%目录不存在,已创建该目录!" md "%X86_SDK_PATH%" ) if not exist %X86_KITS_PATH% ( echo "%X86_KITS_PATH%目录不存在,已创建该目录!" md "%X86_KITS_PATH%" ) if not exist %X86_AV_PATH% ( echo "%X86_AV_PATH%目录不存在,已创建该目录!" md "%X86_AV_PATH%" ) if not exist %X64_PATH% ( echo "%X64_PATH%目录不存在,已创建该目录!" md "%X64_PATH%" ) if not exist %X64_AV_PATH% ( echo "%X64_AV_PATH%目录不存在,已创建该目录!" md "%X64_AV_PATH%" ) if not exist %X64_SQL_PATH% ( echo "%X64_SQL_PATH%目录不存在,已创建该目录!" md "%X64_SQL_PATH%" ) if not exist %PD_PATH% ( echo "%PD_PATH%目录不存在,已创建该目录!" md "%PD_PATH%" ) if not exist %PD_VS_PATH% ( echo "%PD_VS_PATH%目录不存在,已创建该目录!" md "%PD_VS_PATH%" ) if not exist %PD_PC_PATH% ( echo "%PD_PC_PATH%目录不存在,已创建该目录!" md "%PD_PC_PATH%" ) @echo =======link directory to %ROOT_PATH%=======: :: x86 link mklink /j "%S_X86_SKD_PATH%" "%X86_SDK_PATH%" mklink /j "%S_X86_VS_PATH%" "%X86_VS_PATH%" mklink /j "%S_X86_KITS_PATH%" "%X86_KITS_PATH%" mklink /j "%S_X86_AV_PATH%" "%X86_AV_PATH%" :: x64 link mklink /j "%S_X64_AV_PATH%" "%X64_AV_PATH%" mklink /j "%S_X64_SQL_PATH%" "%X64_SQL_PATH%" :: ProgramData link mklink /j "%S_PD_VS_PATH%" "%PD_VS_PATH%" mklink /j "%S_PD_PC_PATH%" "%PD_PC_PATH%" pause VS快捷键 快捷键 含义 Ctrl + k,Ctrl + f 自动格式化代码 Ctrl + k,Ctrl + c 注释代码 Ctrl + k,Ctrl + u 取消注释代码 F9 设置断点 F5 调试运行 Ctrl + F5 不调试运行 Ctrl + Shift + b 编译,不运行 F10 next调试 F11 step调试 调试 添加行号:工具–》选项 –》文本编辑器–》C/C++ –》行号...