In your case, the issue is with the $(SolutionDir) property and not your pre-processor. The issue is that the property $(SolutionDir) is not getting defined and thats why the error. MSBuild does not define the SolutionDir property so you'll need to manually specify it:
msbuild.exe /p:SolutionDir=
Did the pre-processor variable (AppAppPath) get evaluated properly using VS? I was thinking that you need to do something like this to get the right value: http://www.ageektrapped.com/blog/setting-properties-for-wix-in-msbuild/