Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Where do I set flags like $OutDir in Visual Studio?

I am looking through project properties and am seeing variables like $OutDir for output directory. Where can I change this? Thanks.

like image 513
thomas1234 Avatar asked Dec 03 '10 21:12

thomas1234


2 Answers

Some of those can be set, and some cannot. For example, $OutDir would be set under Project Properties, Configuration Properties -> General -> Output directory for C++ projects, and Project Properties -> Build -> Output path for C# projects.

Many of them cannot be changed explicitly. For example, $(SolutionDir) is always the full path to the .sln file. You can move the file, but you cannot change the value explicitly.

For a C++ project, most text fields have a dropdown menu, which will let you bring up an edit window. Click on "Macros" to show them all, and their current values. For a C# project, I think the only place they can be used is in the build events tab: Click the button to bring up a separate edit window, and it will have the same "Macros" button.

like image 176
David Yaw Avatar answered Jan 01 '23 04:01

David Yaw


This stuff is documented by Microsoft in Macros for Build Commands and Properties. That link is for Visual Studio 2015, but I don't think much has changed.

like image 45
Phil Jollans Avatar answered Jan 01 '23 03:01

Phil Jollans