Kunal Balani
Kunal Balani

Reputation: 4789

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 ?

Upvotes: 6

Views: 8009

Answers (1)

stijn
stijn

Reputation: 35901

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.

Upvotes: 7

Related Questions