Question

I know about $(BaseIntermediateOutputPath), but I need the complete path.

For some reason, Microsoft decided to use "$(BaseIntermediateOutputPath)$(ConfigurationName)\" for AnyCPU, but "$(BaseIntermediateOutputPath)$(PlatformName)\$(ConfigurationName)\" for x64.

I have a command that needs to access the .resource files in the intermediate output path. However, since one platform needs $(PlatformName) and the other does not, I can't just use one command. My current solution is to use a condition (Condition=" '$(Platform)' != 'AnyCPU' "). It would be a lot more clean if I just had access to the full intermediate dir, like with $(IntDir) in C++.

I'm sure that the next question is why I don't just use AnyCPU. I have a managed C++ project as part of my solution, and I get dire warnings if I dare reference an x64 project from an AnyCPU project. So why don't I just use x86 and not use AnyCPU? Because the IDE is 32-bit, and the designer will not work with x64 projects. Not only that, but instead of just telling you that, you get cryptic error messages and stack traces in the designer that you have to search here for the meaning of.

Was it helpful?

Solution

$(IntermediateOutputPath).

Look inside c:\Program Files(x86)\MsBuild\Microsoft.Cpp\v4.0\V110\Microsoft.CppCommon.targets.

Line 33: <IntermediateOutputPath Condition="'$(IntermediateOutputPath)'==''">$(IntDir)</IntermediateOutputPath>

Try one of these:

  1. $(IntermediateOutputPath)
  2. $(IntDir)
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top