Choosing your development environment
Before you start programming, you will need to choose an Interactive Development Environment (IDE) that includes a code editor for C#.
The most mature and full-featured IDE to choose is Microsoft Visual Studio 2017, but it only runs on the Windows operating system.
The most modern and lightweight IDE to choose, and the only one from Microsoft that is cross-platform, is Microsoft Visual Studio Code, and it will run on all common operating systems, including Windows, macOS, and many varieties of Linux, such as Red Hat Enterprise Linux (RHEL) and Ubuntu.
Note
To help you decide if Visual Studio Code is right for you, I recommend that you watch the following video, Beginner's Guide to VS Code: Up and Running in Ten Minutes: https://channel9.msdn.com/Blogs/raw-tech/Beginners-Guide-to-VS-Code
To create apps for iOS (iPhone and iPad), tvOS, macOS, and watchOS, you must have OS X or macOS, and Xcode. Although you can use Visual Studio 2017 with its Xamarin extensions to write a cross-platform mobile app, you still need OS X or macOS, and Xcode to compile it. So, in Chapter 15, Building Mobile Apps Using Xamarin.Forms and ASP.NET Core Web API, I will show you how to use Visual Studio for Mac running on macOS to create a Xamarin cross-platform mobile app for iOS and Android that calls a web service hosted on ASP.NET Core.
The following table shows which IDE and operating systems can or must be used for each of the chapters in this book:
Tip
Good Practice
If you have the option, then I recommend you try all the coding exercises with both Visual Studio 2017 on Windows, and Visual Studio Code on macOS, Linux, or Windows. It will be good for you to get experience with C# 7 and .NET Core on a variety of operating systems and development tools.
To write the second edition of this book, I used the following listed software, as you can see in the following screenshot:
- Visual Studio Code version 1.10.2 and Visual Studio for Mac Preview 4, on macOS Sierra version 10.12.3
- Visual Studio 2017 on Windows 10 (in a virtual machine)
- Visual Studio Code on Red Hat Enterprise Linux (in a virtual machine)
Using alternative C# IDEs
There are alternative IDEs for C#, for example, MonoDevelop and JetBrains Rider. You can install either of these two IDEs with the help of the following URLs:
- For MonoDevelop IDE, visit http://www.monodevelop.com/
- For JetBrains Rider, visit https://www.jetbrains.com/rider/
Cloud9 is a web browser-based IDE, so it's even more cross-platform than the others. It is growing in popularity. Here is the link:https://c9.io/web/sign-up/free.
Deploying cross-platform
Your choice of IDE and operating system for development does not limit where your code gets deployed. .NET Core currently supports the following platforms for deployment:
- Windows 7 SP1, or later
- Windows Server 2008 R2 SP1, or later
- OS X El Capitan (version 10.11) and macOS Sierra (version 10.12)
- Red Hat Enterprise Linux 7.2
- Ubuntu 14.04 LTS, 16.04 LTS
- Linux Mint 17
- Debian 8.2
- CentOS 7.1
- Oracle Linux 7.1
- Docker
Note
Docker and Linux OSes are popular server host platforms because they are relatively lightweight and more cost-effectively scalable when compared to operating system platforms that are more for end users, such as Windows and macOS.
In the next section, you will install Microsoft Visual Studio 2017 for Windows. If you prefer to use Microsoft Visual Studio Code, jump ahead to the section titled, Installing Microsoft Visual Studio Code for Windows, macOS, or Linux.