Where is '$OutDir' defined in the script in Visual Studio?
I have combined couple of projects into one solution. These projects are converted into VS2010 from older version. The problem is that I want all the projects to spit out the exectuables/dlls into the solution's debug or release folder but this is not working.
I go into project properites >> Configuration Properities >> General >> 'Output Directory' and change the output directory to $(SolutionDir)$(Configuration)\ but it has not effect the executable/dll are still generated at the old location.
I created a new VS2010 project just to look at the settings and hopefully replicate that in my project. Both the .vcxproj and .sln file has not mention of the SolutionDir or anything else of that nature (like wise it doesn't have OutDir either).
Where does Visual Studio define these? How can I change them so my project does generate output files at that folder! Thanks!
Re: Where is '$OutDir' defined in the script in Visual Studio?
Originally Posted by zspirit
I go into project properites >> Configuration Properities >> General >> 'Output Directory' and change the output directory to $(SolutionDir)$(Configuration)\ but it has not effect the executable/dll are still generated at the old location.
Output Directory is exactly $(OutDir). You have to make sure you rebuild your solution, and there's no errors in build log.
Re: Where is '$OutDir' defined in the script in Visual Studio?
OutDir gets defined by default in one of the default property sheet.
If you override the outdir in the project settings, it'll be overwritten/redefined in the vcxproj file. (between <OutDir> tags. it could be conditional for debug/release.
Re: Where is '$OutDir' defined in the script in Visual Studio?
The easiest way (as I know) of finding out the values for all MSVC $(Anything) is to:
- Click for instance Output Directory
- Click the Arrow and select edit
- Click Macros to display them all
Debugging is twice as hard as writing the code in the first place.
Therefore, if you write the code as cleverly as possible, you are, by
definition, not smart enough to debug it.
- Brian W. Kernighan
Bookmarks