visual-studio-macros

Awesome Visual Studio Macros [closed]

冷暖自知 提交于 2019-12-17 08:01:49
问题 As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance. Closed 8 years ago . For a small community discussion, what are some essential Visual Studio macros you use? I just started learning about them, and want

Toggle “Break when an exception is thrown.” using macro or keyboard shortcut

帅比萌擦擦* 提交于 2019-12-17 07:13:40
问题 Edit: Visual Studio 2015's new exception window is so much faster than the old dialog that I no longer care as much about using a keyboard shortcut for it. Is there a macro or keyboard shortcut that will toggle "break when an exception is thrown" without using the GUI? Opening the dialog with ctrl+alt+e and checking the "Common Language Runtime Exceptions" "Thrown" box then clicking OK is simple enough, but this is something I do a lot. I would rather have a keyboard shortcut for this. This

Visual Studio macro/anything else to iterate through all projects and set project properties

半腔热情 提交于 2019-12-13 15:31:29
问题 I'm trying to write a macro/anything else to iterate though all projects and remove all other build configuration other that Active Solution Configuration - Debug and Active Solution Platform - x86 . Also after editing the configuration for all projects, I want to set pre-build and post-build events to all projects. I have no clue where to start. Please help. I have like 44 projects in solution and its really hard and time consuming to set all these manually. Pre Build event: rd /s /q "$

Can I have a macro run whenever I save a file in Visual Studio 2005?

天涯浪子 提交于 2019-12-12 19:30:47
问题 When I save a file in Visual Studio 2005, I'd like to have a macro also run that updates a copyright (through a regular expression search and replace). I'm not new to regular expressions, but I am new to VB/VBA and Visual Studio macros, so what I need help with specifically is: getting a macro to run upon save, preferably after I press CTRL-S but before it actually writes the file so that the results of the search and replace are actually saved without having to save twice calling search and

Easy VSIX get started?

青春壹個敷衍的年華 提交于 2019-12-11 08:40:11
问题 I've created some macros in VS 2010, I now want to migrate them so they are VSIXs and publish them in the gallery. They are built on top of the DTE object instance provided in the VS macro editor. How to implement this? What is the replacement for the DTE object? Update I also want to configure the extension so that when it's installed on the users machine, it should also install a keyboard shortcut that when pressed, it should run that method in the extension. Note that currently I'm using a

Is there any macro to get the root directory of the TFS Sourcecontrol in Visual Studio?

守給你的承諾、 提交于 2019-12-11 03:56:12
问题 Is there any built-in macro to obtain the TFS Sourcecontrol Root directory in Visual Studio? For example just like $(ProjectDir), I would use $(TFSSourceControlRoot) or something like that? The reason I need this is to in order to use this path in the xcopy command which I will need as a part of a post build action. Instead of writing something like C:\Source\Scripts, I want to write something like $(TFSSourceControlRootDir)\Source\Scripts. 回答1: If you mean the root of the folder structure on

VS addin for quickly viewing preprocessed or assembly output

ぃ、小莉子 提交于 2019-12-08 12:15:25
问题 I'm searching for a one-click way to inspect preprocessed or assembly output. It's just tedious to open file properties, change the respective setting, compile, go to the obj directory and open the resulting file by hand. Does anyone know of any Visual Studio add-in, macro or whatever to automate this task? 回答1: EDIT: An extension for VS 11+ is available @ https://github.com/Trass3r/DevUtils I solved it myself by creating a nice macro. It's way more sophisticated but basically works like this

Is there an API Style reference for Visual Studio Macros

我是研究僧i 提交于 2019-12-07 14:13:34
问题 I would like to automate some common tasks that I do using Visual Studio Macros but I can't find a decent API reference for visual studio objects accessible through macros. Does such a think exist? Or is there a way I can find out what I need with the API? 回答1: Do you mean the DTE? Extending the Visual Studio Environment Customizing, Automating, and Extending the Development Environment How to: Use Add-ins to Control Macros 来源: https://stackoverflow.com/questions/4719371/is-there-an-api-style

Visual Studio macro to navigate to T4MVC link

余生长醉 提交于 2019-12-07 12:54:43
问题 I use T4MVC and I'm happy with it and want to keep it - it keeps down run time defects. Unfortunately, it makes it harder to navigate to views and content (a.k.a. Views and Links in T4MVC) though. Even using Resharper, I can't navigate to the referenced item: T4MVC and Resharper Navigation Can I get a hand building a macro to do this? Never having built a VS IDE macro before, I don't have a grasp on how to get at some things, like the internal results of the "Go To Definition" process, if

How Can I Create a Visual Studio Macro to Change the Keyboard Layout?

扶醉桌前 提交于 2019-12-06 16:08:48
问题 Is it possible to create a Visual Studio (2010) macro to change the keyboard layout? I find the "copy and paste from other applications" bug in Emacs Emulation Mode a bit annoying, so what I wanted to do is create two simple macros - one to set keyboard layout to the Emacs keyboard layout, and one to switch the layout to default (I'm sure there would be an easy way to combine them into "switch between the two", but I wanted to start simple). Not knowing much about VS macros, I figured I could