MSBuild warning MSB8027
Two or more files with the name of filename will produce outputs to the same location. This can lead to an incorrect build result. The files involved are file-path-1 file-path-2.
Two or more source files have the same name, and build results go to the same intermediate directory. The output of the file built first gets overwritten by the next file with the same name. The error is often followed by a LNK4042
warning. This error can occur when you've combined projects that use the same filename in different locations.
There are several ways to resolve this issue:
If your project has two or more source files that have the same name, give the files unique names.
If you can't change the file names, compile each file to a unique intermediate directory. To set the intermediate file location, select the source file in Solution Explorer, then right-click to open the shortcut menu. Choose Properties to open the Property Pages dialog for the source file. Select the Configuration Properties > C/C++ > Output Files property page. Change the Object File Name property from
$(IntDir)
to$(IntDir)%(RelativeDir)
. Choose OK to save your changes.