Is there a list of Visual Studio environment variables? [duplicate] - visual-studio

This question already has answers here:
Closed 10 years ago.
Possible Duplicate:
Link to all Visual Studio $ variables
Visual Studio has a lot of environment variables like $(TargetFileName) but I can't seem to find a list of all of them on MSDN or via Google.
Does such a list exist?
NOTE: See the top answer for the duplicate question (link above) for a link to a list on MSDN.

In most places where you can use those, there's a "Macros" button or similar, which shows all available macros and the current value of them. For example, go to the PostBuild event editor to find the list.
Edit: I just checked. There's a list in MSDN.

You can get the list of available environment variables directly within Visual Studio 2010 with the following steps:
in Visual Studio env, right click on your project
properties
configuration properties / C++ / General
for ex. go into Additional Include directories
'dropdown' Edit
Macros
There you will find a complete list of available macros with their values set according to your settings. This can be very useful when debugging or selecting the right macro for your project settings.

Related

Programmatically change Visual Studio Options

How do I programmatically set and unset Visual Studio Options?
I have done the research and troubleshooting and apparently it is not possible.
Here is a question I answered specifying why it's not possible to programmatically click buttons in the VS Options Dialog:
Programmatically reset VisualStudio shortcuts.
I don't need to click a button, I need to change a boolean setting as per the screenshot.
Might there be any undocumented methods I can use?
Just use:
dte.Properties["Debugging", "General"].Item("EnableExceptionAssistant").Value=false;
Most of the options can be retrieved and set this way. See also:
Options Page, Debugging Node Properties
HOWTO: Getting properties from the DTE.Properties collection of Visual Studio .NET.
You'd have to write code to change the following registry key.
HKEY_CURRENT_USER\SOFTWARE\Microsoft\VisualStudio\14.0\ApplicationPrivateSettings\_metadata\revisions\Microsoft\VisualStudio\Platform
TitleCaseMenus is the node you're after :)
You may need to change the Visual Studio version number depending on what you have installed.
Edit: For your new pic the registry key is here:
HKCU\SOFTWARE\Microsoft\VisualStudio\14.0\Debugger\UseExcept‌​ionHelper

Arrange Code in Visual Studio [duplicate]

This question already has answers here:
Is there a Visual Studio 2010 extension to sort methods?
(5 answers)
Closed 7 years ago.
Is there a way to arrange the code in Visual Studio automatically (built-in functionality or an extension)?
By arrange, I don't mean format, which I know of. I mean to place private fields, public properties, constructors, private/public methods in a certain manner automatically. I've developed an application, but I had longer pauses in development, resulting in not-uniformed code style throughout the project. Is there a way to automate the process of rearranging it to comply to a certain style or do I have to do it all manually?
I use CodeMaid from Visual Studio Extension Gallery. It has a feature where you reorganize the current file by right clicking inside the editor then in the context menu click on Reorganize. It will organize the file by accessibility.
http://www.codemaid.net/
The features are listed on their homepage.

Visual Studio Diff Tool - When is Editing Allowed?

I'm using Visual Studio 2013 and tfs 2013. Sometimes I'll make a code change and click compare with latest version. The diff tool will open and allows me to edit the file in the diff tool. However other times it will not let me edit but will read only.
Is there some setting or something I need to do for me always allow edit?
In a database project I've noticed that it never lets me edit in the diff tool. Is there some setting I need to change?
I've searched around online but haven't found any answers to this.
Thank you.
Editing in the Diff viewer is only allowed for certain file types. It doesn't support editing .sql files and there is no VS setting to allow that.
Visual Studio Diff Window: How to Edit .sql Files
Have you tried other diff tools like WinMerge or Beyond Compare?
In Visual Studio, go
Tools-->Options-->Visual Studio Team Foundation Server-->Configure User Tools,
add the extensions of the file types you would like to compare and under Command,
input the path of the diff tool (in my case it is Beyond Compare)
Other answers are correct as well but do not cover all the cases.
Visual studio will not allow you to edit file during compare if the panel you are trying to edit does not correspond directly to the file in your working directory.
You can easily tell by the address bar on top of the compare panel. If it ends with HEAD or Index - you will not be able to edit the file.

how to compare two files in visual studio ignoring casing

I want to compare two files in visual studio (files containing stored procs)
So I want to ignore all the "Capital" / "Small" differences in the file.
I opened the command window and used Tools.DiffFiles but its taking the case difference also into consideration
P.S I have already seen this question and answers for it
Although Visual Studio is asked for explicitly, I recommend a different tool: WinMerge.
It indeed has many options for comparing and merging files. It lacks a 3-way-merge though. Of course WinMerge can optionally ignore case.
Visual Studio can be configured so you can call WinMerge using "Tools / External Tools ...". Then you may even install a toolbar item for it. Quite nice!
Most version control systems allow you to use WinMerge as a compare tool. For example for TFS you open the "Tools / Options ..." menu and there you choose "Source Control / Visual Studio Team Foundation Server". Click on the button "Configure User Tools".

Visual Studio context menu/toolbar Set StartUp Projects

I am hoping to put a toolbar button (or configure a keyboard shortcut) for the Set StartUp Projects... solution context menu item.
If the solution is selected in Solution Explorer the Project menu has solution context items, but I cannot seem to find this command anywhere. I can only find single Set as StartUp Project and similar.
Does anyone know if I can do this?
EDIT: I found this extension which allows me to do what I want quite easily (define different combinations of start up projects): https://visualstudiogallery.msdn.microsoft.com/f4e1be8c-b2dd-4dec-b273-dd88f8818571
It is the one command Project.SetasStartUpProject that works differently depending on whether a project or the solution is selected in Solution Explorer. To select the solution and then call Project.SetasStartUpProject you can probably use Visual Commander or Macros for Visual Studio 2013.
This extension does exactly what I required. It has linked versions for other editions of VS. It uses json config files to start multiple projects nicely.

Resources