473,498 Members | 1,809 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

SDK Compiler error

Hi,

As a complete novice to C# I have fallen at the first hurdle. Sad but
true, I can't get 'Hello World' to work!

I have downloaded the .net SDK etc and installed them on my
workstation as per Microsoft instructions.. I have written the usual
'Hello World' .cs file and then tried to compile it.

I have used the following versions of the commandline syntax to try
and get it to work without any success. Each attempt is separated by
~~~~~~~~~ for ease of reading.

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Microsoft Windows XP [Version 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.

C:\Documents and Settings\Tony>csc hello1.cs
Microsoft (R) Visual C# .NET Compiler version 7.10.3052.4
for Microsoft (R) .NET Framework version 1.1.4322
Copyright (C) Microsoft Corporation 2001-2002. All rights reserved.

error CS2001: Source file 'hello1.cs' could not be found
fatal error CS2008: No inputs specified

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

C:\Documents and Settings\Tony>csc c:\cs\hello1.cs
Microsoft (R) Visual C# .NET Compiler version 7.10.3052.4
for Microsoft (R) .NET Framework version 1.1.4322
Copyright (C) Microsoft Corporation 2001-2002. All rights reserved.

c:\CS\hello1.cs(8,9): error CS1003: Syntax error, '(' expected
c:\CS\hello1.cs(8,15): error CS1026: ) expected

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

The file is where it is stated. Quite where the '(' & ')' are
expected is anyones guess.

Can anyone help please. The help via /? is useless in this instance.

Many thanks,

Tony W
Nov 16 '05 #1
2 1848
"Tony Wilkinson" wrote :
Hi,

As a complete novice to C# I have fallen at the first hurdle. Sad but
true, I can't get 'Hello World' to work!

I have downloaded the .net SDK etc and installed them on my
workstation as per Microsoft instructions.. I have written the usual
'Hello World' .cs file and then tried to compile it.


Can you post the code you wrote ?

try the following :

using System;

namespace Test
{
class Class1
{
[STAThread]
static void Main(string[] args)
{
Console.WriteLine("Hello world");
}
}
}

--
Francois Beaussier
Fr******@3ie.org.remove
Nov 16 '05 #2
Francois,

Thankyou for your help.

I copied your code and it compiled OK.

Went back to my code and found my declaration for using System
Namespace was in the wrong place. After much searching also found a
few carriage returns after my closing curly bracket.

All now working OK.

Thanks again,
Tony W

On Sun, 23 May 2004 20:14:22 +0200, "Francois Beaussier"
<Fr******@3ie.org.invalid> wrote:
"Tony Wilkinson" wrote :
Hi,

As a complete novice to C# I have fallen at the first hurdle. Sad but
true, I can't get 'Hello World' to work!

I have downloaded the .net SDK etc and installed them on my
workstation as per Microsoft instructions.. I have written the usual
'Hello World' .cs file and then tried to compile it.


Can you post the code you wrote ?

try the following :

using System;

namespace Test
{
class Class1
{
[STAThread]
static void Main(string[] args)
{
Console.WriteLine("Hello world");
}
}
}


Nov 16 '05 #3

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

Similar topics

0
2385
by: rollasoc | last post by:
Hi, I seem to be getting a compiler error Internal Compiler Error (0xc0000005 at address 535DB439): likely culprit is 'BIND'. An internal error has occurred in the compiler. To work around...
1
13142
by: Ayende Rahien | last post by:
reparing resources... Updating references... Performing main compilation... error CS0583: Internal Compiler Error (0xc0000005 at address 53168B12): likely culprit is 'BIND'. An internal...
3
5240
by: Mark Rockman | last post by:
------ Build started: Project: USDAver2, Configuration: Debug .NET ------ Preparing resources... Updating references... Performing main compilation... error CS0583: Internal Compiler Error...
4
3293
by: David Sworder | last post by:
Consider the following line of code (it's not important what it does): resp.DocItem=Relations.SelectDocItems_BySearchString(req.SearchPhrase); It turns out that this line is in error. The...
0
295
by: David Sworder | last post by:
Consider the following line of code (it's not important what it does): resp.DocItem=Relations.SelectDocItems_BySearchString(req.SearchPhrase); It turns out that this line is in error. The...
0
7126
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
7168
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
7381
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...
1
4916
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
4595
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...
0
3096
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3087
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1424
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
293
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...

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.