Running multiple instance of VS2010 projects (command line) using powershell

This topic contains 2 replies, has 2 voices, and was last updated by  Vijayakumar 2 months, 3 weeks ago.

  • Author
    Posts
  • #75074

    Vijayakumar
    Participant

    I have approx 70 VC++2010 projects are there and I have created batch files for each project to compile it via command line and I want to compile multiple batch file (~4) at a time. So I have written one PowerShell script to call this batch files 4 at a time and wait until those 4 batch files are done. The script look likes below.

    ... // loop to assign 4 batch file to "myArry"

    $myArray | %{
    start-process $BuildFileName -ArgumentList "$arg[0]" -PassThru -WorkingDirectory $WorkingDir
    } |Wait-Process
    ...

    So when I run this PS script it works fine. Its starting each batch file (Cmd.exe) and it opens devenv.exe->devenv.com->msbuild.exe->cl.exe.. So for all four batch files, these processes are running.

    But the problem is when I run the same PS script remotely (Enter Ps session via another PC) it's getting failed in between. And the Compilation log shows "Midl.exe" exited with some error codes (some of the error codes are related to Not Enough memory).

    I increased memory(MaxPowershellMB) to 4096 MB but still facing the same issue. I even tried with 7000 MB but no luck

  • #75287

    Dakota Clark
    Participant

    What is your method for starting the script remotely?

    • #75520

      Vijayakumar
      Participant

      I am using "Enter-PSSession" command to connect to the remote PC

You must be logged in to reply to this topic.