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
6
votes
5 answers

Clean up unwanted code C#

I got a C# application with Visual Studio 2005. The code has some 300 KLOC, which has been abused over 3 years. When I was going through code found out that lot of unused functions/methods/properties. Its not possible to clean the code manually…
NileshChauhan
  • 5,469
  • 2
  • 29
  • 43
6
votes
2 answers

Fix macro redefinition in C++

Since intsafe.h and stdint.h both define INT8_MIN. Thus VS2010 generate a warning that says : 1>C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\stdint.h(72): warning C4005: 'INT8_MIN' : macro redefinition 1> C:\Program…
MRebai
  • 5,344
  • 3
  • 33
  • 52
6
votes
0 answers

Getting Bookmarks Programmatically in Visual Studio

I am using VS 2010 and I want to do something quite simple. Write a Macro / Add-in which will Save the bookmarks to a file (e.g. "myfile.bookmarks") Load bookmarks from a file. I just cannot find any API within DTE (when writing a macro) nor can…
6
votes
1 answer

How to reconcile the lack of Macros in Visual Studio 2012

My organization has extremely restrictive and rigid rules our code must comply with in order to obtain certification and accreditation. For the last decade or so we have developed nearly a hundred VS macros that format code, generate comments…
5
votes
1 answer

How to get the topLeft screen position of Visual studio 2008's editor window?

I want to create an addin for vs2008, to show a transparent form/window on the editor of vs2008. in following code, the "aw.Left" and "aw.Top" is relative value, both is 1. QUESTION: do you know how to get the left/top screen position of the editor…
whunmr
  • 2,435
  • 2
  • 22
  • 35
4
votes
1 answer

Can a shortcut button be added to a VS11 toolbar to point at a powershell script/command?

Since support for macros has finished for VS11, is it possible to add a button to point to a powershell script (saved as a file, or somehow similar to a macro), or to execute a single powershell command? Context This would be to kill all the webdev…
StuperUser
  • 10,555
  • 13
  • 78
  • 137
4
votes
1 answer

How to launch VS 2010 so it opens a sln file and selects a specific solution configuration in the environment

I work with a team on a large project developed for multiple platforms. We used to have a separate sln file for each platform so i could chose which platform i want to work on by opening the appropriate sln file. Recently we merged all sln files…
Maria
  • 633
  • 5
  • 12
4
votes
2 answers

How to open a file quickly in visual studio .net

In visual studio, we can open a file in a #Include statement by right clicking the filename in include statement and then clicking "Open Document". But sometimes, when I want to open a file, I don't remember where it was in the project or where has…
binW
  • 13,220
  • 11
  • 56
  • 69
4
votes
5 answers

'CSC : error CS1902: Invalid option 'portable' for /debug; must be full or pdbonly'

I get this error continuously on mac VS 7.4.3 when trying to run simple web form. CSC : error CS1902: Invalid option 'portable' for /debug; must be full or pdbonly I have tried manually updating .csproj file with: portable
Dr Upvote
  • 8,023
  • 24
  • 91
  • 204
4
votes
1 answer

Call a DOS command and redirect the output to a file

I'd like to have a macro in Visual Studio 2005 that calls a DOS command and redirects the output (stdout and stderr) to a file. Just calling the command and ">" redirecting it will not capture stderr, so there are two parts to this: calling a DOS…
Mark
  • 1,124
  • 1
  • 14
  • 21
4
votes
3 answers

Macro taking code statement as argument fails when std::map is present

I have a macro used around a code statement, to introduce nested exception handling: #define TRAP_EXCEPTION(statement) \ try \ { \ try{statement} \ catch(Engine::Exception& e) \ { \ throw…
Mr. Boy
  • 60,845
  • 93
  • 320
  • 589
4
votes
2 answers

Error loading MacroEngine script (file: LawyerProfileView.cshtml)

Working on site i been handed and suddnely a couple of macros have started playing up. Macro was working fine now suddenly this error showed up can anyone help here is the code. @using umbraco.MacroEngines @inherits…
user3103102
  • 91
  • 1
  • 8
4
votes
0 answers

Using a referenced project's TargetPath in a post-build task

Using Visual Studio 2010, I need to have a C# project run a post-build event and reference the outputs of several assemblies built by other dependent projects. In WiX projects, I can use macros from other referenced projects in the solution to get…
4
votes
3 answers

In visual studio, how can I write a macro that will insert the date into a comment?

My question is as exact as it is. I am wondering if it would be possible to insert the date or the date and time into a comment without having to manually write it out. But what I would really like to know is, is there a way to do this and will I…
3
votes
1 answer

Custom Macros not showing as bindable to custom buttons in VS2010

I have a few macros that are working on coworkers machines however when I add them in under my macros I am not able to select them from the list of macros to bind a button in visual studio to execute them.
Gent
  • 2,675
  • 1
  • 24
  • 34
1
2
3
13 14