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.>
You don't specify if this happens for many projects or just one or two.
If it is only in one or two projects, a temporary workaround might be to replace $(SolutionDir) with the explicit path that Folder2 is located in. For example, something like:
"C:\WINDOWS\Microsoft.NET\Framework\v3.5\MSBuild.exe" /p:configuration=Release;platform=x86 /t:rebuild "C:\AllSolutions\ExampleSolutions\Folder2\Folder3\Project2.csproj"
but with the correct path for your project.