473,410 Members | 1,953 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,410 software developers and data experts.

How can I run this line from within a C# console app?

I have the following line that I wish to execute from within a C# Console
Application.

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

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


Apr 11 '07 #1
3 1928
Try code like:

Process proc = new Process();

proc.StartInfo.FileName = @"svcutil.exe";
proc.StartInfo.Arguments = @"http://localhost/COWFeedyardService/
Services/Animal.svc/out:Animal.vb /config:App.config";
proc.Start();

=====================
Clay Burch
Syncfusion, Inc.

Apr 11 '07 #2
That won't work as it is more than likely that the directory where
svcutil is not in the PATH environment variable.

Instead, the OP needs to specify the full path to svcutil.exe in the
arguments to the Process class. That's really the only thing that is
missing (which was pointed out in another thread to the OP as well, by
myself, and others).

--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"ClayB" <cl***@syncfusion.comwrote in message
news:11**********************@n76g2000hsh.googlegr oups.com...
Try code like:

Process proc = new Process();

proc.StartInfo.FileName = @"svcutil.exe";
proc.StartInfo.Arguments = @"http://localhost/COWFeedyardService/
Services/Animal.svc/out:Animal.vb /config:App.config";
proc.Start();

=====================
Clay Burch
Syncfusion, Inc.

Apr 11 '07 #3
Thanks Nicholas. I was just having some trouble with the syntax after all.

Ron

"Nicholas Paldino [.NET/C# MVP]" <mv*@spam.guard.caspershouse.comwrote in
message news:ON**************@TK2MSFTNGP05.phx.gbl...
That won't work as it is more than likely that the directory where
svcutil is not in the PATH environment variable.

Instead, the OP needs to specify the full path to svcutil.exe in the
arguments to the Process class. That's really the only thing that is
missing (which was pointed out in another thread to the OP as well, by
myself, and others).

--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"ClayB" <cl***@syncfusion.comwrote in message
news:11**********************@n76g2000hsh.googlegr oups.com...
>Try code like:

Process proc = new Process();

proc.StartInfo.FileName = @"svcutil.exe";
proc.StartInfo.Arguments = @"http://localhost/COWFeedyardService/
Services/Animal.svc/out:Animal.vb /config:App.config";
proc.Start();

=====================
Clay Burch
Syncfusion, Inc.


Apr 11 '07 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
by: David Hayes | last post by:
I tried finding an answer on http://www.quirksmode.org/ without success. I am attempting a complicated Frames structure. I have made it work in IE, but not Netscape. I begin with three...
5
by: randyelliott | last post by:
Good Day, I have a MS Access (Access 2000 now upgraded to 2003) database that tracks customer information. One function of this database is to create an encrypted license file for our software,...
1
by: AA | last post by:
Somebody know how to get a fixed line in a console application, so if you want to write a command or something in the console, you have always one fixed line where you can do that. Like a prompt, but...
7
by: BlueOysterCult | last post by:
Hello all I have a project that I have to read the file - which I have done I can see the file output. I then need to read the line - parse the line into three separate values (there are 3 = name...
1
by: Good Enchiladas | last post by:
Is it possible to determine a method's own attributes from within the method without hardcoding the name of the method as a constant within the method? Please tell me if it is possible and how it...
0
by: richb330 | last post by:
Hi, I have code from the msdn to crate a user in an AD domain. I have set the code and changed the necessary parameters for the ldap queries but was wondering how i can execute this code on a...
10
by: David B | last post by:
I am writing a console App with VB 2005 where I accept a text file as input, parse it and insert the text data into an SQL table. I have written the code correctly as well as I can tell because it...
5
by: Selva Chinnasamy | last post by:
Hi I have a Windows application written in VB which has many functions. In addition it also reads a database and generates a output file. Currently this function is called when ever user clicks...
2
by: Ronald S. Cook | last post by:
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...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.