Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

warning MSB8004: Output Directory does not end with a trailing slash.

I am getting a warning in my VC++ project as

1>...Microsoft.Cpp\v4.0\V140\Microsoft.CppBuild.targets(368,5): warning MSB8004: Output Directory does not end with a trailing slash. This build instance will add the slash as it is required to allow proper evaluation of the Output Directory.

I do have OutputDirectory value correctly set with trailing slash in my configuration property. How do I debug the path which is creating the problem ?

like image 320
Kunal Balani Avatar asked Aug 01 '17 23:08

Kunal Balani


1 Answers

That warning only occurs when $(OutDir) has no trailing slash, see Microsoft.Cpp.Current.targets line 29. So even though you say you set it correctly (Output Directory in the properties sets $(OutDir) in the project file), msbuild doesn't see that. My guess: you set Output Directory for e.g. the Debug|Win32 configuration but are now building Release|Win32 or so. Or, it gets overridden somewhere else in your project file: open it with a text editor and look for OutDir.

like image 63
stijn Avatar answered Oct 23 '22 21:10

stijn