MSDN

.NET Documentation and Tutorials

Setting Up Your .NET Core Development Environment

Welcome to the essential guide for setting up your development environment for .NET Core. This section will walk you through the necessary steps to get started with building modern, cross-platform applications.

1. Installing the .NET SDK

The .NET Software Development Kit (SDK) includes everything you need to build and run .NET applications, including the runtime, libraries, and tools. We recommend installing the latest LTS (Long-Term Support) version for stability.

2. Choosing a Code Editor or IDE

While you can use any text editor, a robust Integrated Development Environment (IDE) or a powerful code editor will significantly enhance your productivity with features like IntelliSense, debugging, and project management.

Recommendation: For most users, VS Code with the C# Dev Kit is an excellent starting point.

3. Creating Your First .NET Core Application

Let's create a simple "Hello, World!" console application to test your setup.

  1. Open your terminal or command prompt.
  2. Navigate to your desired project directory. cd path/to/your/projects
  3. Create a new console application: dotnet new console -o MyFirstApp This command creates a new directory named MyFirstApp containing your project files.
  4. Navigate into the project directory: cd MyFirstApp
  5. View the default code: Open the Program.cs file in your chosen editor. It will contain code similar to this: // See https://aka.ms/new-console-template for more information Console.WriteLine("Hello, World!");
  6. Run the application: dotnet run You should see the output: Hello, World!

4. Next Steps

Congratulations! You've successfully set up your .NET Core development environment. You're now ready to explore more advanced topics: