Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Portable C# IDE / Compiler?

I'm learning C#, but the fact that it requires and IDE with a compiler makes things a bit more difficult. The main computer I have access to is my school computer that I don't have admin rights on. Is there any way I can put a C# IDE / Compiler on there without requiring admin rights?

Please keep in mind that I want to be able to develop at home with VS C# 2010 and carry the project over to my school computer.

like image 282
rshea0 Avatar asked Feb 28 '12 03:02

rshea0


3 Answers

C# does not require any IDE. Compiler (csc.exe) is part of .Net Framework and you can use it as long as machine have a version of .Net installed.

I.e. for 2.0 path to the compiler is %windir%\Microsoft.NET\Framework\v2.0.50727\csc.exe

You can run it from command line (Start->run->cmd) and see options like "csc /?".

like image 185
Alexei Levenkov Avatar answered Sep 19 '22 16:09

Alexei Levenkov


SharpDevelop can be run from memorystick

like image 29
turbanoff Avatar answered Sep 20 '22 16:09

turbanoff


I learning C#, but the fact that it requires and IDE with a compiler makes things a bit more difficult.

To create a C# application only requires the .Net SDK and it does not need an IDE.

Part of the SDK is the csc.exe which is the C# compiler.

With the SDK installed you can compile and run a C# program like this:

using System;

namespace SampleApplication
{
    static class Program
    {
        /// <summary>
        /// The main entry point for the application.
        /// </summary>
        [STAThread]
        static void Main()
        {
            Console.WriteLine("Hello world!");
        }
    }
}

using this command line.

C:\TEMP>csc test.cs
Microsoft (R) Visual C# 2008 Compiler version 3.5.30729.4918
for Microsoft (R) .NET Framework version 3.5
Copyright (C) Microsoft Corporation. All rights reserved.


C:\TEMP>test.exe
Hello world!
like image 38
veight Avatar answered Sep 18 '22 16:09

veight