官术网_书友最值得收藏!

Setting Up Your Environment

One of the main benefits of .NET Core is that it is cross-platform, which means that it runs on a wide variety of operating systems. You no longer need a dependency on the Windows OS to host or even develop your .NET application. Although this was technically possible before, it is now easier than ever and actively encouraged by Microsoft. They even provide Linux servers on Azure and premade Docker images on which you can build and host your code.

In this chapter, we will show you how to get started with the latest tooling on the OS of your choice. We'll cover the process of setting up a development environment on Windows, macOS (previously OS X), and Linux. Each system has a preferred solution, but there is cross-platform tooling available that will work on any of them.

We will also discuss the modern DevOps way of developing applications and deploying them, using containers. In particular, we will cover how to work with Docker. Containers are a great way of packaging your application and its dependencies so that you can deploy more consistently and with fewer nasty surprises. By shipping your app as a standard unit, you can worry less about configuring a live production server or setting up a new developer workstation.

To get you started, we will cover the following topics in this chapter:

  • Windows
  • macOS
  • Linux
  • Visual Studio 2017
  • Visual Studio for Mac
  • Visual Studio Code
  • .NET Core SDK
  • Command-line tooling
  • Containerization
  • Docker

Feel free to skip to the step-by-step guide that is relevant to you. Or, read them all if you are interested in what the other side looks like. Although we won't be covering Visual Studio Code, command-line, and Docker in relation to every OS, these are applicable to all platforms. We would lose focus if we go over all the possible permutations in this book, and it would be a very long, repetitive read. Check out my blog at https://unop.uk/ for more varied tutorials. As Linux lacks an official .NET IDE and these command-line tools fit better into the Unix philosophy (many simple tools that do one thing well), we'll mostly cover them in the Linux section.

We won't be covering JetBrains Rider here, but if you're familiar with their other products (such as ReSharper, or Android Studio, which is based on the same IntelliJ platform), then you may want to give it a try. The main application is written in Java, and as such, it runs on most popular operating systems.

There are two main steps to setting things up. Firstly, install some tools to help you work more easily with the code. You could use a simple text editor, but this would not be a great experience. Secondly, install the .NET Core Software Development Kit (SDK) that now includes ASP.NET Core. This will hook into the tooling to provide templates and will also be usable from the command line. Later, we will use it to build and run our application. Let's get started!

主站蜘蛛池模板: 赤城县| 福建省| 大庆市| 辉南县| 临泽县| 资阳市| 常州市| 营山县| 安仁县| 余干县| 南丰县| 泊头市| 宁强县| 宝鸡市| 界首市| 清涧县| 克山县| 平罗县| 平远县| 辽宁省| 五家渠市| 顺义区| 咸宁市| 五家渠市| 西峡县| 柳河县| 光山县| 西充县| 叙永县| 盐源县| 加查县| 武威市| 贵德县| 凤城市| 文成县| 巨野县| 宁蒗| 呈贡县| 左贡县| 抚顺县| 怀仁县|