Process.Start problems

  • Thread starter Thread starter Elmo Watson
  • Start date Start date
E

Elmo Watson

I'm just starting to learn VB.Net (winforms) - having known classic vb for
years...

I was trying to build a 'dll compiler' just for grins, using the vbc.exe
that resides in the DotNet Directory.

I have a form that browses to that directory, and builds a string from it,
adding "vbc.exe", along with the proper arguments, like this:
vbcApp = txtDotNetDir.Text & "\vbc.exe"

Process.Start(vbcApp & " /out:" & sFinal & " /t:library " & txtCBDir.Text)

sFinal merely builds a string with a path and the name of the new dll to
save - -

It always stops on this line and says :

An unhandled exception of type 'System.ComponentModel.Win32Exception'
occurred in system.dll
Additional information: The system cannot find the file specified

I've double checked and each of the variables in the equation have valid
paths/filenames and if I used it all manually at the command prompt, it
would work just fine

What am I doing wrong here?
 
Try this :

Process.Start(vbcApp , " /out:" & sFinal & " /t:library " & txtCBDir.Text)

Bye.
 
Back
Top