Portable C# IDE / Compiler?

21,736

Solution 1

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 /?".

Solution 2

SharpDevelop can be run from memorystick

Solution 3

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!
Share:
21,736
rshea0
Author by

rshea0

Updated on July 09, 2022

Comments

  • rshea0
    rshea0 almost 2 years

    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.