简体   繁体   中英

What do I need for a Windows C# quickstart?

What bits and pieces do I need to be able to compile and run a simple Windows console application written in C#? Does the version of Windows matter?

You need

  1. AC# compiler to compile the application
  2. The .NET Framework to execute the application

AC# compiler comes with the free (as in beer) Visual C# Express Edition . A command-line C# compiler ( csc.exe ) is included in every .NET Framework installation.

The .NET Framework is included in different versions in recent versions of Windows. See: What version of the .NET Framework is included in what version of the OS?

More recent versions of the .NET Framework can be downloaded for free from the Microsoft website .

The .NET Framework version needs to match the version the application was compiled against.

1) AC# softwar development kit (SDK) that will include a compiler, a runtime , and libraries. The two main options on windows are:
a) .NET sdk from Microsoft...free as in beer , only for windows
b) Mono sdk from Novell ( open source ) ... free both as in free beer and as in freedom and works on windows, linux, mac..

2) AC# Integrated Development Enviroment (IDE) if you want to develop quickly and painlessly. Here you have at least four options
a) Visual C# Express edition ... from microsoft, only works with .NET and only on windows ... free as in beer
b) Monodevelop ... works both with .NET and Mono and also has versions for windows, linux, mac .. free as as in beer , free as in freedom
c) SharpDevelop .... only windows because only works on top of .NET
d) QuickSharp... only windows because only works on top of .NET

3) Documentation C# language specification, MSDN (most extensive resource) and infinite number of books and articles

Note: Each SDK and IDE download page will mention the Windows version requirements for development. So yes windows version matters. Not only that but the SDK and IDE version also matters because C# is under active development and latest C# feature wont work with older tools.

All you need is a .NET Framework redistribution package and Notepad.

If you have Windows Vista or later the OS will already come with .NET Framework 2.0 installed with the C# 2.0 compiler (you may need to install this from your distribution media).

If you have Windows 2003 it ships with .NET Framework 1.1 and C#1.0. You'll need to download .NET 2.0 or later to take advantages of features that shipped with later releases (for example generics).

You can find a list of different framework versions here:

.NET Framework Downloads

There are links at the bottom of the page for older .NET Framework versions.

Which one will work on your machine will depend on the version and service pack combination of Windows you are running.

Just download Visual C# Express. It's free and includes everything you need, including a project type for console apps.

If your using Windows XP or newer, you're good. The installer will make sure you've got the latest framework version installed.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM