I am used to write code in VS 2008 < . However now I had to start using Notepad++, and I can't get to run even the HelloWorld program. I followed the steps based in this tutorial: http://www.mastercsharp.com/Article/89/writing-your-first-c-program-hello-world-net-v1-1- I have .NET SDK 2.0 installed, but I still can't get the code running. Basically when I try to execute the file from CMD Propmpt I get a message "HelloWorld" is not recognized as an internal or external command, operable program or batch file. Is there anything else that should be installed? I have everything installed to be able to run the code, but I still can't get it to run. Any help will be apreciated. Thank you!
-
That means there is no HelloWorld exe in your current dir or dirs that are on PATHDavid Goshadze– David Goshadze2013-02-22 11:39:39 +00:00Commented Feb 22, 2013 at 11:39
-
Also stackoverflow.com/questions/861384/…Fionnuala– Fionnuala2013-02-22 12:12:00 +00:00Commented Feb 22, 2013 at 12:12
-
Well my problem was more that the code was not running, and all the solutions I looked up didn't work. Joey gave the answer I was looking for. Anyways thanks for your time :)Farkiba– Farkiba2013-02-22 12:15:18 +00:00Commented Feb 22, 2013 at 12:15
3 Answers
Write your program in Notepad++ (or any other text editor). Then on the console use
C:\Windows\Microsoft.NET\Framework\v2.0.50727\csc.exe HelloWorld.cs
to compile it. Afterwards you can run the generated executable.
3 Comments
You can't run HelloWorld.cs, you need to compile it into an executable. Use csc for that.
Or just install Visual Studio Express, it's free.
Comments
You can install CS-Script plugin for Notepad++. The plugin allows execution of the C# code (scripts) directly from Notepad++, without the need for any infrastructure (e.g. project file). It also offers convenient launching of the C# scripts with the system CLR Debugger (e.g. VS) attached.