Strange problem when running a compile Hello World test

  • Thread starter Thread starter Giovanni
  • Start date Start date
G

Giovanni

Hello,

I was playing with Visual C# Compiler version 8.00.40607.42.
I made a simple example to test if the compiler was working fine.
here is the code:


using System;
public class Start{

static void Main()
{
Console.WriteLine("Hello");
}

}

It compiles fine. When I run the executable file, it opens another dos prompt.
While it should just print a line in the shell.
I use windows xp professional.

Could you please explain me why it is doing that.

thanks,

Giovanni
 
Giovanni,

Did you indicte that the target was a console app and not a windows
application? When running csc.exe, you should pass the /target:exe option
to the compiler.

Hope this helps.
 
Back
Top