I have the following script:

```
$mArgs = @('myProj.vcxproj', '/t:Clean,Build' ,('/p:configuration=DEBUG'+';platform=win32;OutDir=./'))
Start-Process msbuild.exe -ArgumentList $mArgs -RedirectStandardOutput $tempFile -wait

```

The above successfully builds myProj. However, it takes a really long time to return. When the above line is reached, I see the msbuild windows for about 2 minutes. Then, it closes. After that, it takes another 8 minutes for the process to complete. If I just run the above in a cmd window, it takes about 2 minutes for it to complete. 
I tried starting the process cmd.exe and passing msbuild as a parameter, but got the same result. 
I also tried Invoke-Expression and also got the same results.

Does anyone have a clue what can be causing this delay ? 

Thanks in advance!