Search icon CANCEL
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
.NET Core 2.0 By Example

You're reading from   .NET Core 2.0 By Example Learn to program in C# and .NET Core by building a series of practical, cross-platform projects

Arrow left icon
Product type Paperback
Published in Mar 2018
Publisher Packt
ISBN-13 9781788395090
Length 458 pages
Edition 1st Edition
Languages
Tools
Arrow right icon
Authors (2):
Arrow left icon
Neha Shrivastava Neha Shrivastava
Author Profile Icon Neha Shrivastava
Neha Shrivastava
Rishabh Verma Rishabh Verma
Author Profile Icon Rishabh Verma
Rishabh Verma
Arrow right icon
View More author details
Toc

Table of Contents (12) Chapters Close

Preface 1. Getting Started FREE CHAPTER 2. Native Libraries in .NET Core 3. Building Our First .NET Core Game – Tic-Tac-Toe 4. Let's Chat Web Application 5. Developing the Let's Chat Web Application 6. Testing and Deploying – The Let's Chat Web Application 7. To the Cloud 8. Movie Booking Web App 9. Microservices with .NET Core 10. Functional Programming with F# 11. Other Books You May Enjoy

Downloading required tools for Windows and Linux

In this section, we will discuss the prerequisites to be downloaded for both Windows and Linux operating systems to start development with .NET Core 2.0. We will start with Windows and then move to Linux. 

Downloads for Windows

Microsoft offers the Visual Studio integrated development environment (IDE) for developers to develop computer programs for Microsoft Windows, as well as websites, web applications, web services, and mobile applications. Microsoft gives us the choice to pick from four Visual Studio adaptations—Community, Professional, Enterprise, and Code. You can download one of these, depending on your individual prerequisite. How these versions differ from each other is explained next.

Navigate to https://www.visualstudio.com/downloads in the browser of your choice. You will see four choices. Select the Visual Studio product based on your requirements.

All versions of Visual Studio 2017 are available for Windows and Macintosh operating systems:

  • Visual Studio Community: This is a free, open source version of Visual Studio with limited features. This is for the individual developer. 
  • Visual Studio Professional: This version has professional developer tools, services, and subscription benefits for small teams (five members).
  • Visual Studio Enterprise: This version supports all Visual Studio features and is meant for end-to-end solution development to meet the demanding quality and scaling needs of teams of all sizes. It is great for enterprise organizations. Some of the key features that come with this version are testing tools, architectural layer diagrams, live dependency validation, architecture validation, code clone detection, IntelliTrace, .NET memory dump analysis, and so on.
  • Visual Studio Code: This is a free, open source version and cross-platform (Linux, macOS, Windows) editor that can be extended with plugins to meet your needs. It includes support for debugging, embedded Git control, syntax highlighting, extension support, intelligent code completion, snippets, and code refactoring.
Make a note that Visual Studio is an IDE, while Visual Studio Code is an editor, just like Notepad is an editor. So Visual Studio Code is much more lightweight, fast, and fluid with great support for debugging and has embedded Git control. It is a cross-platform editor and supports Windows, Linux, and Macintosh. Debugging support is good and has rich IntelliSense and refactoring. Like most editors, it is keyboard-centric. It is a file and folders-based editor and doesn't need to know the project context, unlike an IDE. There is no File | New Project support in Visual Studio Code as you would be used to in Visual Studio IDE. Instead, Visual Studio Code offers a terminal, through which we can run dotnet command lines to create new projects.

So, for development in Windows, we can use either of these:

  • Visual Studio 2017 IDE
  • Visual Studio Code editor

If we choose Visual Studio 2017, all we need to do is download Visual Studio 2017 version 15.3 from https://www.visualstudio.com/downloads. It comes bundled with the .NET Core 2.0 SDK and its templates and so we will be ready for development immediately after installing it. Also with Visual Studio 2017, F# tools automatically get installed once we create an F# project or open an F# project for the very first time. So, the F# development setup is taken care of as well. We will see the installation of Visual Studio 2017 in the Installing .NET Core 2.0 and tools (Windows) section of this chapter.

If we choose Visual Studio Code for development, we need to download Visual Studio Code from https://code.visualstudio.com/download and the .NET Core 2.0.0 SDK from https://www.microsoft.com/net/core#windowscmd . We will look at the installation of Visual Studio Code in the Installing .NET Core 2.0 and tools (Windows) section of this chapter.

Downloads for Linux

As mentioned in the preceding section, Microsoft Visual Studio Code is a cross-platform editor, and it supports Linux operating systems. So, we are going to use Visual Studio Code to create all the example applications on Linux in this book.

Let's start downloading the tools required to stop our development of .NET Core 2.0 applications on the Linux operating system:

  1. Download Visual Studio Code from https://code.visualstudio.com/. We are going to install the Ubuntu 32-bit version, so we will download the Visual Studio Code 32-bit version. Select the Linux x86 .deb stable package for download, as shown in the following image:

If you have a Linux machine handy, you can skip the next download step. If you wish to try development on the Linux platform and have a Windows machine to work with, then the next two steps are for you.

  1. Download VirtualBox from https://www.virtualbox.org/. It is Oracle's open source general-purpose full virtualizer. At the time of writing this chapter, the latest version of VirtualBox is 5.1. The version 5.1.26 was released on July 27, 2017. Using this, we will set up a Linux (Ubuntu) virtual machine on the Windows host machine. Click on Download VirtualBox 5.1. It will open a page that has options on VirtualBox binaries. We can select an option based on the machine on which we are installing it. We are installing it on a Windows machine, so we will click on Windows hosts. In a similar way, we can select different platforms. On clicking Windows hosts, it will download the VirtualBox executable VirtualBox-5.1.26-117224-Win.exe:

VirtualBox needs the Ubuntu International Standards Organization (ISO) image to create the Ubuntu VM, so next we need to download the ISO image of Ubuntu.

  1. Download the ISO image of Ubuntu by navigating to https://www.ubuntu.com. By default, the virtual machine software uses 32-bit Linux, so we will select 32-bit. Hover over the Downloads menu and click on the highlighted Desktop link:

It will take us to the downloads page for the desktop. Click Download on Ubuntu for the desktop. It will start the download of Ubuntu 17.04 ISO. An ISO image of approximately 1.5 GB will be downloaded.

  1. Download .NET Core 2.0 SDK from https://www.microsoft.com/net/download/linux

With this, we are done with the downloads for our setup in Linux. In the next section, we will learn how to install and set up these tools.

Ubuntu 17.04: As of writing this chapter, this is the latest version, and its code name is Zesty Zapus, released on April 13, 2017. Ubuntu releases carry a version number in the form of XX.YY, with XX representing the year and YY representing the month of the official release. For example, the latest version released in April 2017 is represented by 17 (year) and 04 (month). Ubuntu code names use an adjective animal combination, that is an adjective word followed by the name of an animal, typically one that's unique. At the time of writing, Ubuntu 17.10 is due to be released in October 2017; examples covered here used the Ubuntu 17.04 version.
You have been reading a chapter from
.NET Core 2.0 By Example
Published in: Mar 2018
Publisher: Packt
ISBN-13: 9781788395090
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime