用资源管理器右键编译 Visual Studio 解决方案文件
每次改动 VC 工程之后都要重新编译,每次 VS 又会生成调试数据库文件,很费时间,于是研究了一下如何在资源管理器中直接编译,还真发现了解决办法。
以下是适用 Visual Studio 2008 的注册表文件,导入系统之后右键点 .sln 文件就会出来编译的菜单了:
Windows Registry Editor Version 5.00[HKEY_CLASSES_ROOT\VisualStudio.Launcher.sln\Shell][HKEY_CLASSES_ROOT\VisualStudio.Launcher.sln\Shell\Build Debug] @="使用 VCBuild 编译 Debug(&D)"[HKEY_CLASSES_ROOT\VisualStudio.Launcher.sln\Shell\Build Debug\Command] @="cmd.exe /K \"\"C:\\Program Files\\Microsoft Visual Studio 9.0\\VC\\vcpackages\\vcbuild.exe\" \"%1\" \"Debug|Win32\"\""[HKEY_CLASSES_ROOT\VisualStudio.Launcher.sln\Shell\Bulild Release] @="使用 VCBuild 编译 Release(&R)"[HKEY_CLASSES_ROOT\VisualStudio.Launcher.sln\Shell\Bulild Release\Command] @="cmd.exe /K \"\"C:\\Program Files\\Microsoft Visual Studio 9.0\\VC\\vcpackages\\vcbuild.exe\" \"%1\" \"Release|Win32\"\""
自 Visual Studio 2010 开始,微软使用 MSBuild 取代了 Visual C++ 的 VCBuild,所以方法有些不同:
Windows Registry Editor Version 5.00[HKEY_CLASSES_ROOT\VisualStudio.Launcher.sln\Shell][HKEY_CLASSES_ROOT\VisualStudio.Launcher.sln\Shell\Build Debug] @="使用 MSBuild 编译 Debug(&D)"[HKEY_CLASSES_ROOT\VisualStudio.Launcher.sln\Shell\Build Debug\Command] @="cmd.exe /K \"C:\\Windows\\Microsoft.NET\\Framework\\v4.0.30319\\MSBuild.exe /m \"%1\" /p:Configuration=Debug /t:Build\""[HKEY_CLASSES_ROOT\VisualStudio.Launcher.sln\Shell\Bulild Release] @="使用 MSBuild 编译 Release(&R)"[HKEY_CLASSES_ROOT\VisualStudio.Launcher.sln\Shell\Bulild Release\Command] @="cmd.exe /K \"C:\\Windows\\Microsoft.NET\\Framework\\v4.0.30319\\MSBuild.exe /m \"%1\" /p:Configuration=Release /t:Build\""
VS2013中右键编译CSharp项目
Windows Registry Editor Version 5.00[HKEY_CLASSES_ROOT\VisualStudio.Launcher.csproj.12.0\Shell][HKEY_CLASSES_ROOT\VisualStudio.Launcher.csproj.12.0\Shell\Build Debug] @="使用 MSBuild 编译 Debug(&D)"[HKEY_CLASSES_ROOT\VisualStudio.Launcher.csproj.12.0\Shell\Build Debug\Command] @="cmd.exe /K \"C:\\Windows\\Microsoft.NET\\Framework\\v4.0.30319\\MSBuild.exe /m \"%1\" /p:Configuration=Debug /t:Build\""[HKEY_CLASSES_ROOT\VisualStudio.Launcher.csproj.12.0\Shell\Bulild Release] @="使用 MSBuild 编译 Release(&R)"[HKEY_CLASSES_ROOT\VisualStudio.Launcher.csproj.12.0\Shell\Bulild Release\Command] @="cmd.exe /K \"C:\\Windows\\Microsoft.NET\\Framework\\v4.0.30319\\MSBuild.exe /m \"%1\" /p:Configuration=Release /t:Build\""
VS2013中右键编译CPP项目
Windows Registry Editor Version 5.00[HKEY_CLASSES_ROOT\VisualStudio.Launcher.vcxproj.12.0\Shell][HKEY_CLASSES_ROOT\VisualStudio.Launcher.vcxproj.12.0\Shell\Build Debug] @="使用 MSBuild 编译 Debug(&D)"[HKEY_CLASSES_ROOT\VisualStudio.Launcher.vcxproj.12.0\Shell\Build Debug\Command] @="cmd.exe /K \"C:\\Windows\\Microsoft.NET\\Framework\\v4.0.30319\\MSBuild.exe /m \"%1\" /p:Configuration=Debug /t:Build\""[HKEY_CLASSES_ROOT\VisualStudio.Launcher.vcxproj.12.0\Shell\Bulild Release] @="使用 MSBuild 编译 Release(&R)"[HKEY_CLASSES_ROOT\VisualStudio.Launcher.vcxproj.12.0\Shell\Bulild Release\Command] @="cmd.exe /K \"C:\\Windows\\Microsoft.NET\\Framework\\v4.0.30319\\MSBuild.exe /m \"%1\" /p:Configuration=Release /t:Build\""
其他VS版本就自己对着注册表修改就是了,很方便。
注意:使用 MSBuild 的时候会检查环境变量“Platform”,如果不确定配置的是否正确,建议删除该环境变量即可(安装完 Visual Studio 会默认该变量指为 BNB,导致 MSBuild 无法正确编译,但若启动 Visual Studio IDE 来编译则不会存在此问题)。
用资源管理器右键编译 Visual Studio 解决方案文件相关推荐
- 理解 Visual Studio 解决方案文件格式(.sln)
一般情况下我们并不需要关心 Visual Studio 解决方案文件格式(.sln),因为 Visual Studio 对解决方案文件的自动修复能力是非常强的.但是如果遇到自动解冲突错误或者编译不通过 ...
- 解决Windows资源管理器右键菜单打开EditPlus容易导致资源管理器无响应问题
解决Windows资源管理器右键菜单打开EditPlus容易导致资源管理器无响应问题 参考文章: (1)解决Windows资源管理器右键菜单打开EditPlus容易导致资源管理器无响应问题 (2)ht ...
- Visual Studio 解决方案版本从v12-->v14
Visual Studio 解决方案版本从v12-->v14 参考文章: (1)Visual Studio 解决方案版本从v12-->v14 (2)https://www.cnblogs. ...
- Visual Studio解决方案的目录结构设置和管理
Visual Studio解决方案的目录结构设置和管理 参考文章: (1)Visual Studio解决方案的目录结构设置和管理 (2)https://www.cnblogs.com/CHNMurph ...
- 关掉visual studio 在桌面上右键---在visual studio中打开
关掉visual studio 在桌面上右键-在visual studio中打开 visual studio 在桌面上右键-会出现在visual studio中打开 看这里,就可以 1.新建个文本文档 ...
- 怎样用调用资源管理器explore.exe打开指定的文件夹
怎样用调用资源管理器explore.exe打开指定的文件夹 VCL组件开发及应用 http://www.delphi2007.net/DelphiVCL/html/delphi_20061225173 ...
- Visual Studio 搜索文件快捷键
Visual Studio 搜索文件快捷键 搜索文件快捷键 搜索文件快捷键 ctrl+,
- Visual studio解决方案管理器找不到了怎么办
有的时候打开VS2019后的界面如下:发现找不到cpp文件了. 点击最上面一排的视图,然后点解决方案资源管理器: 之后出现了自己想要的结果:
- 您如何计算Visual Studio解决方案中的代码行?
是否可以在整个解决方案中找到代码行数? 我听说过MZ-Tools ,但是有没有开源的? #1楼 你可以使用: SCLOCCount http://www.dwheeler.com/sloccount/ ...
最新文章
- 加速OA系统实施的四大要素
- Altium Designer关闭板观察器,放大镜
- CSDN绑定GitHub账号
- 数据结构之栈的应用:表达式求值
- MogDB如何配置IPv6?
- volatile的作用及原理
- app屡次停止运行怎么解决_打桩机发动机温度过热的问题及运行中熄火怎么解决_行业新闻...
- c语言五位数大到小排序,刚学c语言,老师让用if编一个五个数字从大到小的排序,有那个大神能帮我,谢谢啦...
- IO子系统的层次结构
- 寄云PaaS平台荣获“优秀创新项目奖”
- poj 2231 Moo Volume 暴力一定超时啊
- 循环buffer的实现_Go并发编程-Channel的设计实现
- UE4代做 UE4外包 UE4报错
- 电动汽车动力系统整车仿真,具有双向DCDC变换器实现能量反馈
- roundcube db.inc.php,Roundcube Webmail 安装配置篇
- codeforces 894A QAQ
- 2022软工-安庆集团-冲刺计划
- 微信小程序 老男孩课程(day1-2.5 到django不会了..要学Pythone)
- 剖析Solidity合约创建EVM bytecode
- 团体程序设计天梯赛 L1-题目
热门文章
- 推荐几个win8系统下载比较好的网站
- 将实例的生成交给子类——工厂方法模式
- linux之systemctl命令
- Java中J.U.C扩展组件之ForkJoinTask和ForkJoinPool
- python动态创建字典_如何在Python中创建动态命名字典?
- Json转化的三种方式
- 苹果成为存储厂商的新饽饽
- IIS7.5安全配置研究
- 编写自定义的字符串一致性匹配方法,只要两个字符串包含同样的字符, 不管字符的顺序如何,都认为两个字符串一致,如:”aabbcc”和”abcabc”被认为是一致的...
- 我所知道的Javascript