Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Save more on your purchases! discount-offer-chevron-icon
Savings automatically calculated. No voucher code required.
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
C# 7 and .NET Core: Modern Cross-Platform Development

You're reading from   C# 7 and .NET Core: Modern Cross-Platform Development Create powerful cross-platform applications using C# 7, .NET Core, and Visual Studio 2017 or Visual Studio Code

Arrow left icon
Product type Paperback
Published in Mar 2017
Publisher
ISBN-13 9781787129559
Length 594 pages
Edition 2nd Edition
Languages
Tools
Arrow right icon
Author (1):
Arrow left icon
Mark J. Price Mark J. Price
Author Profile Icon Mark J. Price
Mark J. Price
Arrow right icon
View More author details
Toc

Table of Contents (18) Chapters Close

Preface 1. Hello, C#! Welcome, .NET Core! 2. Speaking C# FREE CHAPTER 3. Controlling the Flow, Converting Types, and Handling Exceptions 4. Using .NET Standard Types 5. Debugging, Monitoring, and Testing 6. Building Your Own Types with Object-Oriented Programming 7. Implementing Interfaces and Inheriting Classes 8. Working with Databases Using the Entity Framework Core 9. Querying and Manipulating Data with LINQ 10. Working with Files, Streams, and Serialization 11. Protecting Your Data 12. Improving Performance and Scalability with Multitasking 13. Building Universal Windows Platform Apps Using XAML 14. Building Web Applications Using ASP.NET Core MVC 15. Building Mobile Apps Using Xamarin.Forms and ASP.NET Core Web API 16. Packaging and Deploying Your Code Cross-Platform A. Answers to the Test Your Knowledge Questions

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:

Choosing your development environment

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)

    Choosing your development environment

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:

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.

lock icon The rest of the chapter is locked
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
Banner background image