显然,Visual Studio 2012中删除了宏。

有没有插件/扩展/工具可以让我录制和播放键盘宏(就像Visual Studio 2010中的录制/播放临时宏一样)?

例如,在将代码从一种语言转换为另一种语言或从文本列表中快速生成属性等时,我通常会使用宏。


当前回答

In this version of Visual Studio, while there are literally hundreds of features, there are some we’ve actually taken out. One of those is the macros automation feature, including macro record/replay, macro projects and the Macros IDE. While we know that macros have been valuable for those who use them, unfortunately our usage data shows that less than 1% of Visual Studio developers take advantage of this feature. Therefore, we’ve found ourselves investing more deeply in the Visual Studio areas that get used every day, and have not updated macros for several releases.

来源:Visual Studio 11开发者预览中的宏

我已经开始绕过这个(虽然不方便)通过剪切/粘贴到notepad++,记录和运行宏,然后剪切/粘贴回Visual Studio 2012。

其他回答

In this version of Visual Studio, while there are literally hundreds of features, there are some we’ve actually taken out. One of those is the macros automation feature, including macro record/replay, macro projects and the Macros IDE. While we know that macros have been valuable for those who use them, unfortunately our usage data shows that less than 1% of Visual Studio developers take advantage of this feature. Therefore, we’ve found ourselves investing more deeply in the Visual Studio areas that get used every day, and have not updated macros for several releases.

来源:Visual Studio 11开发者预览中的宏

我已经开始绕过这个(虽然不方便)通过剪切/粘贴到notepad++,记录和运行宏,然后剪切/粘贴回Visual Studio 2012。

站出来投票支持把宏带回来!

http://visualstudio.uservoice.com/forums/121579-visual-studio/suggestions/2650757-bring-back-macros

更新(10/4/2013):

耶!感谢您的投票宏现在考虑返回!继续推动!

我们目前正在评估在Visual Studio的未来版本中提供脚本功能的可行性。在我们研究这个建议时,请继续就我们应该提供什么样的脚本功能提出您的意见。 Tony Goodhew, VS Pro项目经理。

Visual Commander扩展可以让您自动执行Visual Studio中的重复任务。

VSScript允许在Lua中记录、编写和编辑宏,尽管我还不能让它与Visual Studio 2015一起工作(命令按钮是灰色的;文档说Visual Studio 2005到2015 RC是支持的)。

它目前是作为免费软件发布的。

使用Visual Studio 2013 + 2015的宏

宏开源URL: https://github.com/Microsoft/VS-Macros

在MSDN博客上的公告:宏扩展:VS 2015支持和开源