Questions tagged [visual-studio-macros]

A macro is a series of commands and instructions that you group together as a single command to accomplish a task automatically. Macros allow you to automate repetitive actions. Visual Studio includes the Macros integrated development environment (IDE), which is used solely for creating, manipulating, editing, and running macros. The Macros IDE is separate from the Visual Studio IDE.

The Visual Studio Macros integrated development environment (IDE) has the same look and feel as the Visual Studio IDE, but is separate from it. The Macros IDE includes the Code Editor and several tool windows. These windows function the same as their Visual Studio counterparts, except that they apply specifically to the code and projects within the Macros environment.

209 questions
2
votes
2 answers

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

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…
Soham Dasgupta
  • 5,061
  • 24
  • 79
  • 125
2
votes
0 answers

Debuggee CPU state in a Visual Studio macro

In a Visual Studio macro, can I directly retrieve the CPU state of the debuggee process? It's a vanilla Wintel-32 process. GetExpression("EAX") works, but calling it for all registers takes a nontrivial amount of time. Maybe one can automate the…
Seva Alekseyev
  • 59,826
  • 25
  • 160
  • 281
2
votes
2 answers

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

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…
pencilCake
  • 51,323
  • 85
  • 226
  • 363
2
votes
1 answer

visualstudio addin move macros

VS.Net 2012 get rid of macros. So I need to import my VS2010 macros to AddIn or Extension for using them with VS2012 There are many samples in the net, how to create buttons in toolbar with some actions. But I don't need buttons. I just want to…
2
votes
1 answer

Determine variable type under caret in a Visual Studio macro

Is there a technique to determine the type under the cursor,ActiveDocument.Selection. I can use DTE.ExecuteCommand("Edit.GoToDefinition") to jump around the solution, and start parsing the file etc, but it seems a little kludgy. I've tried using…
jasper
  • 3,424
  • 1
  • 25
  • 46
1
vote
0 answers

How do I turn on 'Show life semantic errors' option automatically with VS2010?

I'm using resharper with VS2010 and it has the habbit of turning off 'Show life semantic errors' under Tools - Options -Text Editor - C# - Advanced, every time I start up VS2010. I am looking for a simple way to turn it back on (ie a button on a…
1
vote
2 answers

Which (batch) language to learn for merging sourcefiles?

I'm creating a Greasemonkey/UserScript script. Because of the Greasemonkey sandbox I have to keep everything in one file but at 5k+ lines, maintenance is beginning to become rather difficult. So I want to split up the script in multiple files and…
Laoujin
  • 9,962
  • 7
  • 42
  • 69
1
vote
3 answers

Can I Programatically Modify the IDE's Context Menu's?

I am trying to create an additional menu item for the "Project and Solutions Context Menus>Solution" menu. However, I wanted this context menu to appear ONLY when a certain solution was opened, otherwise I don't want it to show. I figured I could…
TekkGuy
  • 107
  • 2
  • 15
1
vote
2 answers

How do I record a Visual Studio macro to set Options settings?

I've just tried to record a macro to help me switch word-wrap in editors on and off quickly, but all the macro records is DTE.ExecuteCommand("Tools.Options"), which leaves me with a big, dumb open dialogue when I try and execute the macro. How can I…
ProfK
  • 49,207
  • 121
  • 399
  • 775
1
vote
2 answers

Operation aborted (Exception from HRESULT: 0x80004004 E_ABORT) when setting text in a VS2010 macro

Some very simple macros don't work for me in VS2010. For instance if I do: DTE.ActiveDocument.Selection.Text = "123" this will work fine, but if instead I type DTE.ActiveDocument.Selection.Text = "//123" then this fails with the ugly…
Coder_Dan
  • 1,815
  • 3
  • 23
  • 31
1
vote
1 answer

Dangers with unscoped multiline MACROS

Is there a way to protect this MACRO from unscoped if/for statements? #define FOO(X, Y, ...) X->bar(_##Y->thatVar, __VA_ARGS__);\ post_op(X, Y) The order of bar and post_op is important and the result of post_op is ignorable to the…
Daniel
  • 53
  • 7
1
vote
0 answers

Visual Studio macro that navigates to file and function of selected text

I work a lot with WPF, and have lots of files in a project which makes navigation sometimes a bugger. I tried to write a macro that helps me at it, but I haven't managed doing so far after struggling a few hours. And not using VB at all, it makes it…
Honnes
  • 325
  • 1
  • 12
1
vote
2 answers

How to create a VS2008 macro to alter C++ project settings?

I want to write a Visual Studio macro that switches off optimisations for a given C++ project. Does anyone have sample code to alter a project setting? And assuming that project settings are exposed as some sort of dictionary of values, what are the…
mackenir
  • 10,801
  • 16
  • 68
  • 100
1
vote
1 answer

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

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…
user15486
1
vote
2 answers

Insert new line with macros on Visual Code

The React Native Hot Reload on the device doesn't work fine all the time, according to the code you are working with, so we have to reload the app. Therefore, I'm writing a code snipet to reload my android device always I save a file on Visual Code,…