用资源管理器右键编译 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 解决方案文件的更多相关文章
- [Cordova] 无法编译Visual Studio项目里Plugin副本的Native Code
[Cordova] 无法编译Visual Studio项目里Plugin副本的Native Code 问题情景 开发Cordova Plugin的时候,开发的流程应该是: 建立Cordova Plug ...
- 为Windows资源管理器右键菜单添加菜单项
为Windows资源管理器右键菜单添加菜单项 在Windows下命令行用的比较多,经常在资源管理器里翻到某个目录,若想要在此目录下跑命令,只能是打开cmd.exe,然后一路cd才能到达此目录. 每次都 ...
- Win7 资源管理器右键固定的文件夹不见了
把常用的文件夹固定到任务栏的资源管理器右键菜单中 某天突然就不见了! %APPDATA%\Microsoft\Windows\Recent\AutomaticDestinations “最近" ...
- 清理Visual Studio解决方案临时文件:Clean Visual Studio Solution Temporary File Build20160418
复制保存到任意文件名.bat,放置在Visual Studio Solution目录下. 当Visual Studio Solution目录过于庞大或打算拷贝移动Visual Studio Solut ...
- Visual studio 创建文件时自动添加备注
Visual studio 创建文件时自动添加备注 描述 要求每回添加一个类,普通类或单元测试类文件头自动添加备注, 比如:Copyright, FileName, Author and so on. ...
- [No00009C]Visual Studio在 解决方案资源管理器 里同步定位打开的文件
标题的意思就是在使用VS的时候,需要我们打开编辑的文件跟解决方案的资源管理器同步显示,这样方便定位到我们在修改哪个文件. 设置如下: 工具——选项——项目和解决方案——在解决方案资源管理器中跟踪活动项 ...
- Visual Studio解决方案的目录结构设置和管理
摘至:http://blog.csdn.net/lp310018931/article/details/47991759 首先,解决方案和项目文件夹包含关系(c++项目): VS解决方案和各个项目文件 ...
- Visual Studio解决方案vs2005/vs2008/vs2010/vs2012/vs2013/vs2015版本互相转换工具
原文:http://blog.csdn.net/xiejiashu/article/details/52397641 本文转自EasyDarwin团队成员Alex的博客:http://blog.c ...
- visual studio 因为文件过期重新编译项目
最近visual studio总是莫名其妙的重新编译某个工程, 导致大量项目rebuild . 蛋都碎了... 查了好久, 这种无厘头的问题最烦了 参考这篇文章, http://blogs.msdn ...
随机推荐
- 【[SDOI2009]Bill的挑战】
一看题解好像全是状压DP,那么我就来补充一个容斥写法吧 乍一看,好像是水题,枚举选哪k个串,然后判断 1,如果这k个串中至少两个串某位置确定且不相同,答案显然为02,如果这个位置只被有且仅有一个串确定 ...
- GeoHash核心原理解析 - OPEN 开发经验库
阅读目录 引子 一.感性认识GeoHash 二.GeoHash算法的步骤 三.GeoHash Base32编码长度与精度 三.GeoHash算法 四.使用注意点 引子 机机是个好动又好学的孩子,平日里 ...
- sql server 约束 查找
--1.主键约束 SELECT tab.name AS [表名], idx.name AS [主键名称], col.name AS [主键列名] FROM sys.indexes idx JOIN s ...
- 聚类:(K-means)算法
1.归类: 聚类(clustering) 属于非监督学习 (unsupervised learning) 无类别标记(class label) 2.举例: 3. K-means 算法: ...
- CF455D. Serega and Fun
D. Serega and Fun time limit per test 4 seconds memory limit per test 256 megabytes input standard i ...
- Sublime Text安装SVN插件
下载插件 Sublime Text2/3 SVN插件 点击下载 安装插件 点击设置(Preferences)->浏览程序包(Browse Packages,,,),新建TortoiseSVN文件 ...
- input文本框 输入限制三则
其一,只允许输入数字和小数点. <input onKeypress="return (/[\d.]/.test(String.fromCharCode(event.keyCode))) ...
- ecshop,大商创后台支付系统修改模板
初始模板 要求修改 增加了多个账户可供用户进行选择 解决方法 一找到要修改模板路径:即:http://dsctest.cn/admin/payment.php?act=edit&code=ba ...
- Scala入门3(特质线性化)
尝试设计一套特质,灵活的改动整数队列.队列有两种操作:put把整数放入队列,get从尾部取出它们.队列是先进先出的,get应该依照入队列的顺序取数据.提示:可以用mutable.ArrayBuffer ...
- 【知了堂学习笔记】java 底层容易忽略的知识点
1. java中的关键字 提到关键字,最主要的就是不能用关键字作为标识符,值得注意的有以下几点. ①其中goto与const在java中没有定义,但是也是关键字.这个基本用不到,但是应该有个认知. ② ...