Prebuild event in Visual Studio replacing $(SolutionDir) with *Undefined*
I believe the problem is documented here moved here and looks like it might be a bug in visual studio, but I'm wondering if anyone knows of a workaround. Basically I have the following two lines (among other things) one right after the other in the prebuild event. "C:\WINDOWS\Microsoft.NET\Framework\v3.5\MSBuild.exe" /p:configuration=Release;platform=x86 /t:rebuild "$(SolutionDir)Folder1\Project1.csproj" "C:\WINDOWS\Microsoft.NET\Framework\v3.5\MSBuild.exe" /p:configuration=Release;platform=x86 /t:rebuild "$(SolutionDir)Folder2\Folder3\Project2.csproj" The first one succeeds and the other