Reputation: 24767
I am building my cpp app using MSBuild. I am using the following command:
MSBuild <path_to_sln> /t:ProjectName:rebuild /p:OutDir=C:\projOutput\;configuration=release
lib
, pdb
and exp
files are put in the projOutput
folder, however the exe is not there. I can see in the log that the exe is put into another directory.
How can i set and force the directory in which the exe will be placed?
Upvotes: 1
Views: 1528
Reputation: 35911
The command you show is correct. You can verify this by creating a new project: without modifying any settings pdb and exe go in OutDir. If this doesn't work for you, the only possibility seems the project is overriding the exe path somewhere. Look in the project settings, or if it's a custom project check the TargetName
property.
Upvotes: 2