Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Command Line Compiler

Status
Not open for further replies.

Craftor

Programmer
Feb 1, 2001
420
NZ
Hi all

I am trying to compile a DLL from the command line but I need to include one of the web references. My command line is as follows:
Code:
csc /t:library /r:System.dll,System.Web.dll,system.xml.dll,bin\Debug\Pub.dll,bin\Debug\ErrorClient.dll,Web References\CService\Reference.cs VarEmitter.cs
The above gives me the following error:

error CS2001: Source file 'References\CService\Reference.cs' could not be
found
error CS0006: Metadata file 'Web' could not be found

I've tried putting quotes around the web reference path but it then gives me the following error:

fatal error CS0009: Metadata file 'c:\Inetpub\ References\CService\Reference.cs' could not be opened -- 'File is
corrupt'


I can build the project fine in Visual Studio so I'm not sure why it sees this as being corrupt.

Can anyone help me with this please?

Thanks as always


Craftor
:cool:
 
If you want to compile outside of Visual Studio, take a look at nant, the .NET build tool. It's free, it makes light work of compiling a list of files, and doesn't have any problems with quoting.
 
Hi all

Thanks for the responses - turns out you can't include your reference.cs file from Web References. I used the wsdl utility to create a class file for the Web Service and included that in my command line compilation.

Thanks as always


Craftor
:cool:
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top