How run this line from within a console application?

R

Ronald S. Cook

I have the following line that I wish to execute from within a VB.NET
Console Application.

svcutil.exe http://localhost/COWFeedyardService/Services/Animal.svc
/out:Animal.vb /config:App.config /language:VB

Manually, I can open the Windows SDK Command Prompt and type exactly the
above and it works. But how can I make it work from within a console app?

Thanks for any help,
Ron
 
Z

zacks

I have the following line that I wish to execute from within a VB.NET
Console Application.

svcutil.exehttp://localhost/COWFeedyardService/Services/Animal.svc
/out:Animal.vb /config:App.config /language:VB

Manually, I can open the Windows SDK Command Prompt and type exactly the
above and it works. But how can I make it work from within a console app?

Thanks for any help,
Ron

Use the Process class to create a subprocess to execute the command.
 
H

Herfried K. Wagner [MVP]

Ronald S. Cook said:
I have the following line that I wish to execute from within a VB.NET
Console Application.

svcutil.exe http://localhost/COWFeedyardService/Services/Animal.svc
/out:Animal.vb /config:App.config /language:VB

Manually, I can open the Windows SDK Command Prompt and type exactly the
above and it works. But how can I make it work from within a console app?

\\\
Imports System.Diagnostics
....
Process.Start("...\svcutil.exe", "http://... /language:VB")
///
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top