Question is a bit unclear, about platform / configuration, but also about file / project.
I’ve searched a bit for an official source. According to [MS.Learn]: Build and clean projects and solutions in Visual Studio (emphasis is mine)
In Solution Explorer, choose multiple files that can be compiled, open the shortcut menu for one of those files, and then choose Compile, or press Ctrl+F7.
If the files have dependencies, the files will be compiled in dependency order. The compile operation will fail if the files require a precompiled header that isn’t available when you compile. The compile operation uses the current active solution configuration.
I prepared an example to illustrate the behavior:
In the VStudio 2017 window above, platform and configuration (x64, Release) are highlighted in red, while current file file and the project it belongs to (dll00.c, dll00) in green. When compiling current file (Ctrl + F7) the information is also displayed in the Output window (at the bottom, highlighted in thinner lines).
But there is a catch: the solution and project(s) platform / configuration tuples must be properly configured (and mapped):
In the above solution properties window, I selected All Platforms / All Configurations just to present all 8 configurations (2 projects / 2 platforms / 2 configurations), but one must be sure that for a specific solution platform / configuration tuple, the corresponding projects tuples are selected.
Check [MS.Learn]: Understand build configurations for more details.
Might be (more or less) related:

