Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. cant get standardoutput when calling devenv from System.Process

cant get standardoutput when calling devenv from System.Process

Scheduled Pinned Locked Moved C#
csharpdebuggingquestion
1 Posts 1 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • C Offline
    C Offline
    chuckdawit
    wrote on last edited by
    #1

    I have a method that creates a new process and calls the command line. I can get standardoutput into the procResults strings for most of my calls. But for some reason when I use this method to call devenv to build a c# solution I don't get anything in standardoutput. It seems like it finishes the call because all new files are built and I can see the last modified date is the current time, but the procResults string is empty. Here is my call: 'devenv alphacetui.sln /rebuild "debug|x86"' it seems like it finishes ok because I get a p.Exitcode = 0; Does anyone have experience calling devenv from system.process or know why I'm not getting output? when I run devenv alphacetui.sln /rebuild "debug|x86" from the command line it works fine and I can see the output in the command window. public void method() { Process p = new Process(); p.StartInfo.FileName = "devenv"; p.StartInfo.Arguments = "alphacetui.sln /rebuild \"debug|x86\""; p.StartInfo.UseShellExecute = false; p.StartInfo.RedirectStandardOutput = true; p.Start(); string procResults = p.StandardOutput.ReadToEnd(); p.WaitForExit(); }

    1 Reply Last reply
    0
    Reply
    • Reply as topic
    Log in to reply
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes


    • Login

    • Don't have an account? Register

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • World
    • Users
    • Groups