Investigating a build problem that only occurs on our build server, I was surprised to see this answer point out there is both a $(ProjectDir)
and a $(MSBuildProjectDir)
, the former sometimes not available.
What is the difference in general? Should I always be using $(MSBuildXXX)
versions of properties if available? Why use $(ProjectDir)
in the first place?
Contrary to advice in the other Q&A, I'm sometimes seeing $(MSBuildProjectDir) = ''
.