473,378 Members | 1,360 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,378 software developers and data experts.

Command line compiling...

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
May 1 '06 #1
1 2162
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.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"Papanii Okai" <pa*****@somuah.com> wrote in message
news:OD**************@TK2MSFTNGP02.phx.gbl...
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

May 1 '06 #2

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

Similar topics

0
by: dmg | last post by:
is there a recommended practice for deploying .net web applications? we use a command line compiling method and seem to be running into issues with conflicting assemblies... especially in those...
6
by: Edd Dawson | last post by:
Hi. I have a strange problem involving the passing of command line arguments to a C program I'm writing. I tried posting this in comp.programming yesterday but someone kindly suggested that I'd...
2
by: Luca Paganelli | last post by:
Hi everybody. I've got a simple but bothering problem. I've just written a little application in C#. I've got a set of business logic classes and a window forms GUI released as a set of...
5
by: Genboy | last post by:
My "VIS" Website, which is a C# site created in VS.NET, Framework 1.1, is no longer compiling for me via the command line. As I have done 600 times in the last year and a half, I can compile to...
0
by: Louise Caldicott | last post by:
Hi all, I have created a project in Visual Studio which uses satellite assemblies. I have also written a script to build this project from the command line. There seems to be a difference in...
3
by: michael | last post by:
How can I compile my VS.NET ASP.NET project from the command line?
4
by: N. P. | last post by:
I do not have Visual Basic .NET Standard or higher but I have downloaded the ..NET SDK and the 101 VB.NET samples from the MSDN website. I am sure that there must be a way to compile and...
2
by: mei xiao | last post by:
Hi, there, I have a small web service project written in C# and compiled using visual studio.net, but how can I compile it using command line? Thank you. -May
3
by: andrew | last post by:
Hello, I have spend the past day trying to figure out how to do this. PROBLEM: My instructor wants us to use a shapes library that horstmann wrote. An example would be: /////////////////////////...
10
by: arlef | last post by:
Hi Guys, When learning a language such as C#, would you say it is better to learn the fundamentals using the command-line compiler and a simple text editor such as notepad compared to using a...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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...

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.