It happens in a complex solution, but I can reproduce it in a new empty solution.
I built it (ctrl+shift+B
) with debug mode, X86, diagnostic.
1> Set Property: _InvalidConfigurationMessageText=The OutputPath property is not set for project 'ConsoleApplication1.vcxproj'. Please check to make sure that you have specified a valid combination of Configuration and Platform for this project. Configuration='Debug' Platform='Win32'. 1> Set Property: _InvalidConfigurationMessageText=The OutputPath property is not set for project 'ConsoleApplication1.vcxproj'. Please check to make sure that you have specified a valid combination of Configuration and Platform for this project. Configuration='Debug' Platform='Win32'. This error may also appear in some other project is trying to follow a project-to-project reference to this project, this project has been unloaded or is not included in the solution, and the referencing project does not build using the same or an equivalent Configuration or Platform.
^ I make sure that there isn't any References
that it claims.
Here is what I have tried.
First, a part of my .vcxproj
(link to the full file) looks like this:-
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v141</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
### I will insert something here ###
</PropertyGroup>
According to a SO link and another one, I should insert one of these lines at
###
:-<OutputPath>$(Configuration)\$(Platform)\</OutputPath> <OutputPath>$(SolutionDir)$(Configuration)\</OutputPath> <OutputPath>bin\$(Platform)\</OutputPath>
Same as above, but add it in
<ItemGroup Label="ProjectConfigurations">
Remove
Label="Configuration"
.According to another SO link, I also tried
AnyCPU
orAny CPU
(tested in a more complex solution, but a new empty solution doesn't have it.).A Microsoft link states that
Output Path
is forC#
. InC++
, I must useOutput Directory
. It isOutDir
.<OutDir>$(SolutionDir)$(Configuration)\</OutDir> <OutDir>$(Configuration)\$(Platform)\</OutDir>
Do above things, but in a property sheet.
Do above things, but also unloaded-reload project, and even restart VS2017.
After I tried every combination, the warning still exists.
The program can be compiled and run correctly,
but I believe it is a cause of unnecessary recompilation in a much larger solution.
Question: How to solve the warning/error?
OutputPath
word in the console is suspicious.
I doubt VS recognize my solution as C#
. (is it even possible? - my test project has std::cout
)
For some reasons, most SO questions about this error are related to msbuild or C# or .net (another one), not C++.
Reply
There is no such Win32
option in the combo box, so I create a new one.
Configuration Manager
> Active solution platform
: <New...>
I also make sure that the setting is correct :-
However, I still got the same error message.