Command line compiling...

P

Papanii Okai

Hi Guys,

I am trying to use the command line to compile a .cs file to a
dll. I am using the Windows SDK command shell for this. Below is the
command..



C:\Documents and Settings\Papanii Okai\Desktop>csc /t:library HelloWorld.cs
/reference:System.dll



I am referencing the System.dll because i am using System.ServiceModel in my
code but obviously it is wrong. Below is the error I am getting but I don't
know why?



Microsoft (R) Visual C# 2005 Compiler version 8.00.50727.42

for Microsoft (R) Windows (R) 2005 Framework version 2.0.50727

Copyright (C) Microsoft Corporation 2001-2005. All rights reserved.



HelloWorld.cs(2,14): error CS0234: The type or namespace name 'ServiceModel'
does not exist in the namespace 'System' (are you missing an assembly
reference?)



I tried / reference System.ServiceModel.dll but I got the error.



error CS0006: Metadata file 'System.ServiceModel.dll' could not be found



Any help would be appreciated...




--Papanii
 
N

Nicholas Paldino [.NET/C# MVP]

Papanii,

It appears you are trying to compile something for WCF.

From what I recall, the WCF assemblies are not in the framework
directory. You have to find the full path of the System.ServiceModel.dll
assembly that you are referencing and use that.

Hope this helps.
 

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