I am looking through project properties and am seeing variables like $OutDir for output directory. Where can I change thi开发者_StackOverflow社区s? Thanks.
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.
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.
I tried to change it for a C++ project in Visual Studio 2019 and needed some time to find the option.
Go to Project Properties -> Configuration Properties -> General -> Output Directory and set the value for the $(OutDir), then click Apply -> Ok.
精彩评论