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

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!

主站蜘蛛池模板: 陈巴尔虎旗| 漯河市| 南昌县| 平乐县| 炎陵县| 阿坝县| 平昌县| 平武县| 蓬溪县| 新邵县| 修武县| 江山市| 灌阳县| 息烽县| 嘉祥县| 夏津县| 稷山县| 山丹县| 石阡县| 华安县| 永善县| 富阳市| 贡觉县| 大余县| 黑山县| 肇源县| 东源县| 吴江市| 禄丰县| 鹤峰县| 遂宁市| 普安县| 平安县| 赞皇县| 福州市| 宣威市| 曲水县| 庆阳市| 富阳市| 东明县| 湘乡市|