.NET Standard 2.0 Cookbook
Develop high quality, fast and portable applications by leveraging the power of .NET Standard Library
Fiqri Ismail
- 394 pages
- English
- ePUB (mobile friendly)
- Available on iOS & Android
.NET Standard 2.0 Cookbook
Develop high quality, fast and portable applications by leveraging the power of .NET Standard Library
Fiqri Ismail
About This Book
Get the most out of.NET framework using standard libraries and create a.NET Standard 2.0 library from scratchAbout This Book⢠Write code once and share within.NET ecosystem in Windows, Linux and macOS⢠Give your.NET Libraries a common framework in cloud and on premise with the latest.NET Standard 2.0⢠Build a wide range of applications from Mobile with Xamarin to Web with ASP.NETWho This Book Is ForThis book is for.NET developers who are looking to build dynamic applications with the latest.NET Standard. C# knowledge is required.What You Will Learn⢠Create a.NET Standard 2.0 library⢠Use System.IO within the.NET Standard 2.0⢠Make use of your legacy.NET libraries with the new.NET Core standard⢠Explore the thread support to create a multithreaded.NET Standard 2.0 library⢠Create a.NET Standard 2.0 library and use it with an Android and iOS application⢠Implement various Visual Studio 2017 diagnostics and debugging tools⢠Create a NuGet Package and submit the package to the NuGet Package Manager ⢠Use Visual Studio 2017 azure tools to deploy the application to Azure⢠Test and deliver a.NET Standard 2.0 libraryIn DetailThe.NET Standard is a standard that represents a set of APIs that all.NET platforms have to implement, making it easy for developers to access and use one common library for their development needs. This book begins with a quick refresher, helping you understand the mechanics of the new standard and offering insight into how it works. You'll explore the core library concepts, such as working with collections, configurations, I/O, security, and multithreading. You'll explore the iOS and Android libraries of Xamarin and we'll guide you through creating a.NET Standard 2.0 library, which you'll use with both Android and iOS applications. In the final chapters, you'll learn the various debugging and diagnostics tools to deliver quality libraries and create a NuGet package of the.NET Standard 2.0 library. By the end of this book, you'll be able to expand your current workflow to various.NET flavors and have the essential skills to create a.NET Standard 2.0 library from scratch to package and deliver it to the world.Style and approachA recipe-based approach to help you get the most out of the.NET Standard 2.0 Library that can be implemented to all the.NET Platforms
Frequently asked questions
Information
Working with Files
- Setting up .NET Core in Ubuntu
- Creating a log as text
- Creating an ASP.NET Core application in Ubuntu to use the library
- Setting up .NET Core in macOS
- Reading from a comma separated (CSV) text file
- Creating a .NET Core console application in macOS to use the library
- Compressing? Why not?
- Creating a classic Windows application to use the library
- Encrypting and Decrypting content in a text file
- Creating a classic Windows application to use the library
Technical requirements
https://github.com/PacktPublishing/DotNET-Standard-2-Cookbook/tree/master/Chapter03
https://goo.gl/82FCEP
Introduction
Setting up .NET Core in Ubuntu
- VMWare Workstation Player for Windows: https://www.vmware.com/products/workstation-player.html
- Oracle Virtual Box for Windows, Linux, and macOS: https://www.virtualbox.org/wiki/Downloads
Getting ready
$ lsb_release -a
How to do it...
- Open your favorite browser, type the following URL, and press Enter:
https://www.microsoft.com/net/download/linux
- Select the Install .NET Core SDK 2.x Package button.
- From the Linux Distribution drop-down list, select Ubuntu 16.04.
- Follow the instructions on the page to install the current SDK or perform the following steps to install.
- Now open the terminal, type the following command, and press Enter:
$ curl https://packages.microsoft.com/keys/microsoft.asc |
gpg --dearmor > microsoft.gpg
- If you have a fresh installation of Ubuntu you might not have curl installed. If not use the following command to install curl:
$ sudo apt-get install curl
- Now, again in the terminal type the following command and press Enter to get the list of files:
$ sudo mv microsoft.gpg /etc/apt/trusted.gpg.d/microsoft.gpg
- Type the following command and press Enter in the terminal:
$ sudo sh -c 'echo "deb [arch=amd64]
https://packages.microsoft.com/repos/
micro...