473,811 Members | 3,290 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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\Papani i Okai\Desktop>cs c /t:library HelloWorld.cs
/reference:Syste m.dll

I am referencing the System.dll because i am using System.ServiceM odel 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.ServiceM odel.dll but I got the error.

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

Any help would be appreciated...


--Papanii
May 1 '06 #1
1 2182
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.ServiceM odel.dll
assembly that you are referencing and use that.

Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard. caspershouse.co m

"Papanii Okai" <pa*****@somuah .com> wrote in message
news:OD******** ******@TK2MSFTN GP02.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\Papani i Okai\Desktop>cs c /t:library
HelloWorld.cs /reference:Syste m.dll

I am referencing the System.dll because i am using System.ServiceM odel 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.ServiceM odel.dll but I got the error.

error CS0006: Metadata file 'System.Service Model.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
1053
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 applications that use third party .net components.
6
2939
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 have better luck here. So here goes! My program ignores any command line arguments, or at least it's supposed to. However, when I pass any command line arguments to the program, the behaviour of one of the functions changes mysteriously. I have...
2
2626
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 libraries (dll). So the GUI class extends the System.Windows.Forms.Form base class and anything else (no Main method). From the class in which I've written the Main method and that's included
5
14044
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 VIS.DLL via Visual Studio, with no problems: ------ Rebuild All started: Project: VIS, Configuration: Debug .NET ------ Preparing resources... Updating references...
0
1458
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 behaviour when I link the resources via Dev Studio and the command line.
3
4919
by: michael | last post by:
How can I compile my VS.NET ASP.NET project from the command line?
4
1609
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 successfully run these 101 samples from the command-line but even though I tried hard there are problems with the resources .resx files. Eg. I tried using the following command to compile one of the 101 samples: vbc *.vb /res:frmMain.resx,frmMain.resources...
2
7372
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
2178
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: ///////////////////////// #include "ccc_win.h" int ccc_win_main() {
10
1954
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 full-fledge IDE such as VS.NET 2005 which gives code-insight, debugger, etc? Regards, James.
0
9726
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9605
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10647
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10384
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10395
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10130
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7667
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5692
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
3
3017
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.