A while back I was working with a customer that was moving from doing all of their builds with the devenv command line to using MSBUILD. However we ran into a hiccup that did not make sense at first. Basically when they tried to build their solution using MSBUILD some of the custom build steps where failing because $(SolutionDir) was not defined.
After thinking about it a bit is became clear that MSBUILD did not define the SolutionBuild property that Visual Studio does. So where did that leave us?
There are a couple of basic approaches:
Just thought I would share incase this comes up for someone else.
Zach