Max Length on ProcessStartInfo.Arguments

  • Thread starter Thread starter Jonathan Crawford
  • Start date Start date
J

Jonathan Crawford

I have noticed that when I try to run a process using ProcessStartInfo
to set a really long argument, over 33,000 characters. The whole
string doesn't get passed into the process being started.

Specifically I am using the System.Diagnosis.Process class to run
csc.exe and compile our software product because we have a solution
with over 170 projects and it takes 40 minutes to load and build in
visual studio. But by parsing the solution and project files I can
build it in under 5 minutes with a custom written app. The only
problem I have is a couple of projects have so many files in them now,
when I create the compile string it cuts off the end of it before
starting csc and so that specific project doesn't run. Does anyone
have any thoughts on this?

Thanks for the help.
If you can email me back at
jonathan.p.crawford@_TIGER_gmail.com
minus the cat, I would appericate it.
 
Take a look at the 'response file' option to csc.exe. This allows you to
place in a disk file all the stuff that you are now putting on the command
line, and replace it with a single parameter which is the @ character
followed by the file specification of the response file. Old-time users of
Make will recognize this pattern.

Tom Dacon
Dacon Software Consulting
 
Back
Top