Introduction¶
This article explains how to set the default executable path for every new Visual Studio project. This can be useful for binding new custom executables located in a custom directory. This article explains also how to revert to the default settings in the case of a broken path.
Modifying the executable path in Visual Studio¶
To modify the executable path of a Visual Studio project, it is first necessary to load a C++ project. Then use the context menu to view the properties of it and select the item "VC++ Directories".
An item called "Executable Directories" is then visible as in the following screenshot.
It is then possible to edit it with the following dialog:
This page permits to select between inherited settings or custom settings. We will show how to modify the inherited settings.
Setting the default inherited settings in Visual Studio¶
Visual Studio use two different settings files for 32 bit and 64 bit applications.
Architecture | Location |
---|---|
32 bit | %HOMEPATH%\AppData\Local\Microsoft\MSBuild\v4.0\Microsoft.Cpp.Win32.user.props |
64 bit | %HOMEPATH%\AppData\Local\Microsoft\MSBuild\v4.0\Microsoft.Cpp.x64.user.props |
Removing it permits to revert to the original settings from Visual Studio.
To set a custom value create an XML file with the following template and edit the ExecutablePath
value: