Exploring the .NET Core 3.0 Runtime: Through Code Generation and Metadata Inspection
()
About this ebook
Explore advanced .NET APIs and create a basic .NET core library with dynamic code generation and metadata inspection to be used by other libraries or client applications. This book starts with the benefits of .NET including its fundamental tasks and tools where you will learn .NET SDK tools and the ILDasm tool. This is followed by a detailed discussion on code generation in .NET API programming.
Along the way, you will learn how to build a programming model through a code-generator tool and metadata inspector tool using .NET version information for .NET assembly and binary code. Exploring the .NET Core 3.0 Runtime covers the features of Microsoft Visual Studio 2019 using a tutorial and shows you how to create a .NET Core 3.0 application. Here you will configure and deploy your .NET projects along with meta packages and see some do's and don'ts. Finally, you will compare the features of .NET Core 3.0 with the .NET Framework library and its GUI frameworks.
After reading this book, you will be able to work in a .NET 3.0 environment and program for its two advanced features: code generation and metadata inspection.
What You Will Learn
- Understand the inner workings of an assembly’s structural organization
- Work with reflection through the .NET Core platform
- Carry out dynamic code generation using the .NET Core API's code document model (CodeDOM)
- Use the metadata mechanism of the .NET Core platform
Who This Book Is For
Software developers and engineers using .NET and/or the .NET Core platform and tools.
Related to Exploring the .NET Core 3.0 Runtime
Related ebooks
Visual Studio Code Distilled: Evolved Code Editing for Windows, macOS, and Linux Rating: 3 out of 5 stars3/5The IT Support Handbook: A How-To Guide to Providing Effective Help and Support to IT Users Rating: 0 out of 5 stars0 ratingsPractical Oracle JET: Developing Enterprise Applications in JavaScript Rating: 0 out of 5 stars0 ratingsDesign Patterns in Modern C++: Reusable Approaches for Object-Oriented Software Design Rating: 0 out of 5 stars0 ratingsThe Definitive Guide to JSF in Java EE 8: Building Web Applications with JavaServer Faces Rating: 0 out of 5 stars0 ratingsPro C# 8 with .NET Core 3: Foundational Principles and Practices in Programming Rating: 0 out of 5 stars0 ratingsVisual Studio Condensed: For Visual Studio 2013 Express, Professional, Premium and Ultimate Editions Rating: 0 out of 5 stars0 ratingsPractical API Architecture and Development with Azure and AWS: Design and Implementation of APIs for the Cloud Rating: 0 out of 5 stars0 ratingsMicrosoft Azure Cosmos DB Revealed: A Multi-Model Database Designed for the Cloud Rating: 0 out of 5 stars0 ratingsSwift 3 Object-Oriented Programming - Second Edition Rating: 0 out of 5 stars0 ratingsPractical Rust Projects: Building Game, Physical Computing, and Machine Learning Applications Rating: 3 out of 5 stars3/5Exploring Blazor: Creating Hosted, Server-side, and Client-side Applications with C# Rating: 0 out of 5 stars0 ratingsCreating ASP.NET Core Web Applications: Proven Approaches to Application Design and Development Rating: 0 out of 5 stars0 ratingsFoundations of Libvirt Development: How to Set Up and Maintain a Virtual Machine Environment with Python Rating: 0 out of 5 stars0 ratingsIntroducing Vala Programming: A Language and Techniques to Boost Productivity Rating: 0 out of 5 stars0 ratingsSoftware Engineering from Scratch: A Comprehensive Introduction Using Scala Rating: 0 out of 5 stars0 ratingsDeep Learning with Azure: Building and Deploying Artificial Intelligence Solutions on the Microsoft AI Platform Rating: 0 out of 5 stars0 ratingsQuick Start Guide to Dart Programming: Create High-Performance Applications for the Web and Mobile Rating: 0 out of 5 stars0 ratingsC# Deconstructed: Discover how C# works on the .NET Framework Rating: 0 out of 5 stars0 ratingsGetting Started with Visual Studio 2019: Learning and Implementing New Features Rating: 0 out of 5 stars0 ratingsOptimizing Visual Studio Code for Python Development: Developing More Efficient and Effective Programs in Python Rating: 0 out of 5 stars0 ratingsRegex Quick Syntax Reference: Understanding and Using Regular Expressions Rating: 0 out of 5 stars0 ratingsMachine Learning with Microsoft Technologies: Selecting the Right Architecture and Tools for Your Project Rating: 0 out of 5 stars0 ratingsDeveloping Web Components with TypeScript: Native Web Development Using Thin Libraries Rating: 0 out of 5 stars0 ratingsLearning NServiceBus Sagas Rating: 0 out of 5 stars0 ratingsLearning Azure DocumentDB Rating: 0 out of 5 stars0 ratingsIntroducing Play Framework: Java Web Application Development Rating: 0 out of 5 stars0 ratings.Net Framework and Programming in ASP.NET Rating: 0 out of 5 stars0 ratingsC++17 Quick Syntax Reference: A Pocket Guide to the Language, APIs and Library Rating: 0 out of 5 stars0 ratingsDevSecOps for .NET Core: Securing Modern Software Applications Rating: 0 out of 5 stars0 ratings
Programming For You
Python: For Beginners A Crash Course Guide To Learn Python in 1 Week Rating: 4 out of 5 stars4/5HTML & CSS: Learn the Fundaments in 7 Days Rating: 4 out of 5 stars4/5Python Programming : How to Code Python Fast In Just 24 Hours With 7 Simple Steps Rating: 4 out of 5 stars4/5Java for Beginners: A Crash Course to Learn Java Programming in 1 Week Rating: 5 out of 5 stars5/5SQL: For Beginners: Your Guide To Easily Learn SQL Programming in 7 Days Rating: 5 out of 5 stars5/5Coding All-in-One For Dummies Rating: 4 out of 5 stars4/5Python Machine Learning By Example Rating: 4 out of 5 stars4/5Learn to Code. Get a Job. The Ultimate Guide to Learning and Getting Hired as a Developer. Rating: 5 out of 5 stars5/5Learn SQL in 24 Hours Rating: 5 out of 5 stars5/5SQL QuickStart Guide: The Simplified Beginner's Guide to Managing, Analyzing, and Manipulating Data With SQL Rating: 4 out of 5 stars4/5Linux: Learn in 24 Hours Rating: 5 out of 5 stars5/5Pokemon Go: Guide + 20 Tips and Tricks You Must Read Hints, Tricks, Tips, Secrets, Android, iOS Rating: 5 out of 5 stars5/5Excel : The Ultimate Comprehensive Step-By-Step Guide to the Basics of Excel Programming: 1 Rating: 5 out of 5 stars5/5Grokking Algorithms: An illustrated guide for programmers and other curious people Rating: 4 out of 5 stars4/5SQL All-in-One For Dummies Rating: 3 out of 5 stars3/5Modern C++ for Absolute Beginners: A Friendly Introduction to C++ Programming Language and C++11 to C++20 Standards Rating: 0 out of 5 stars0 ratingsWeb Designer's Idea Book, Volume 4: Inspiration from the Best Web Design Trends, Themes and Styles Rating: 4 out of 5 stars4/5101 Amazing Nintendo NES Facts: Includes facts about the Famicom Rating: 4 out of 5 stars4/5OneNote: The Ultimate Guide on How to Use Microsoft OneNote for Getting Things Done Rating: 1 out of 5 stars1/5Learn PowerShell in a Month of Lunches, Fourth Edition: Covers Windows, Linux, and macOS Rating: 0 out of 5 stars0 ratings
Reviews for Exploring the .NET Core 3.0 Runtime
0 ratings0 reviews
Book preview
Exploring the .NET Core 3.0 Runtime - Roger Villela
© Roger Villela 2019
R. VillelaExploring the .NET Core 3.0 Runtimehttps://doi.org/10.1007/978-1-4842-5113-3_1
1. Exploring .NET Core
Roger Villela¹
(1)
Sao Paulo, São Paulo, Brazil
This chapter gives you an overview of the .NET Core platform and the features of Microsoft Visual Studio 2019 specific to the environment.
Acronyms
The following are the acronyms introduced in this chapter and used throughout the book:
Application programming interface (API)
Base Class Library (BCL)
Common Type System (CTS)
Common Intermediate Language (CIL)
Common Language Infrastructure (CLI)
Common Language Runtime (CLR)
Common Language Specification (CLS)
Framework Class Library (FCL)
General availability (GA)
Intermediate language (IL)
Just-in-time (JIT)
Target framework moniker (TFM)
Long-term support (LTS)
Microsoft Intermediate Language (MSIL)
Release candidate (RC)
Virtual Execution System (VES)
About the .NET Core Platform
.NET Core is a general-purpose, .NET cross-platform development framework that provides support for Microsoft Windows, Apple macOS, and Linux distributions. Like the .NET Framework, the .NET Core implementation is based on the ECMA-335 specification.
The .NET Core project is available on GitHub; it is open source and maintained by Microsoft and the .NET community. With the .NET Core platform, it is possible to write applications, libraries, and components for desktop development, web development, cloud development, device development, and IoT applications. Here are some examples of GitHub repositories, including WPF and Windows Forms, that are now officially .NET Core–based UI frameworks:
GitHub repository for .NET Core (https://github.com/dotnet/core)
.NET Core is a self-contained .NET runtime and framework that implements ECMA-335. It can be (and has been) ported to multiple architectures and platforms. It supports a variety of installation options and has no specific deployment requirements itself. This repo includes several documents that explain both high-level and low-level concepts about the .NET runtime. These documents are particularly useful for contributors to get context that can be difficult to acquire from just reading code.
GitHub repository for .NET Core Foundational Class Libraries, the BCL and FCL (https://github.com/dotnet/corefx)
The .NET platform has a standard set of class libraries. The BCL (core set) is expected with any .NET implementation, because without it, you would not have a functional implementation of .NET. The FCL (complete set) is not fully required, but these two libraries provide .NET types for many general and app-specific types. Commercial and community libraries can be built on top of the BCL and FCL libraries. The CoreFX repository contains both, the BCL and the FCL.
GitHub repository for the .NET Core runtime, the CoreCLR (https://github.com/dotnet/coreclr)
This is the runtime for .NET Core; it is composed of the garbage collector, JIT compiler, primitive data types, and low-level classes. The .NET Core runtime implements the ECMA-335 specification, is a self-contained .NET runtime and framework, has been ported to multiple architectures and platforms, and, having no specific deployment requirements itself, supports a variety of installation options.
GitHub repository for .NET WPF UI framework (https://github.com/dotnet/wpf)
The WPF is now officially a .NET Core–based UI framework for the development of applications and components for the Microsoft Windows desktop. It runs exclusively on the Microsoft Windows family of operating systems and relies on Microsoft DirectX technologies. It has a vector-based graphics architecture that enables the use of high-DPI monitors and infinity scale and uses the Extensible Application Markup Language (XAML) to provide a declarative model for application programming.
GitHub repository for .NET Core Windows Forms UI framework (https://github.com/dotnet/winforms)
Windows Forms is now officially a .NET Core–based UI framework for the development of applications and components for the Microsoft Windows desktop. The Windows Forms UI framework runs exclusively on the Microsoft Windows family of operating systems and relies on Microsoft Windows GDI+ technology.
GitHub repository for ASP.NET Core (https://github.com/aspnet/AspNetCore)
ASP.NET Core is an open source, cross-platform framework for building web applications, cloud-based applications, IoT applications, and back-end services for mobile applications. It can be hosted on Windows, Mac, or Linux and can be deployed in the cloud or on-premises.
For .NET Core 3.0, Microsoft has officially scheduled the .NET Core 3.0 RC for July 2019, the .NET Core 3.0 GA for September 2019, and the .NET Core 3.1 LTS for November 2019.
Microsoft is also reorganizing Microsoft .NET, and by 2020, there will be only one .NET Framework, not the .NET Framework and .NET Core. You can learn more in the post Introducing .NET 5
at https://devblogs.microsoft.com/dotnet/introducing-net-5/ .
According to an official chronogram, Microsoft has scheduled the new .NET 5.0 (GA) for November 2020, .NET 6.0 (LTS) for November 2021, .NET 7.0 (GA) for November 2022, and .NET 8.0 (LTS) for November 2023.
Now let’s talk about Microsoft Visual Studio 2019 support for .NET Core.
Microsoft Visual Studio 2019 Support for .NET Core
Microsoft offers great support within the Microsoft Visual Studio IDE for .NET Core development. The images and comments in this section are based on features of Microsoft Visual Studio 2019 RTM (Community, Professional, and Enterprise) version 16.1.4.
If you’re using Microsoft .NET Core 3.0 preview version (preview 6 at the time of this writing), Microsoft advocates using Microsoft Visual Studio 2019 version 16.0 as the minimum version. Here’s a list of minimum versions to use for Microsoft Visual Studio 2019 and Microsoft Visual Studio 2017:
Microsoft Visual Studio 2019 version 16.0 or higher for developing applications and components targeting .NET Core 3.0 (preview 6 at the time of this writing)
Microsoft Visual Studio 2017 version 15.9 or higher for developing applications and components targeting .NET Core 2.2
Microsoft Visual Studio 2017 version 15.7 or higher for developing applications and components targeting .NET Core 2.1
Microsoft Visual Studio 2017 version 15.0 or higher for developing applications and components targeting .NET Core 1.x
Figure 1-1 shows Microsoft Visual Studio 2019’s new start window with choices for creating projects using project templates and opening recent projects and solutions. You can also apply filters for programming language, platform, and project type.
../images/482513_1_En_1_Chapter/482513_1_En_1_Fig1_HTML.jpgFigure 1-1
Microsoft Visual Studio 2019’s new start window for creating, opening, and connecting to a source repository
At the time of writing, the following are examples of templates for .NET Core in Microsoft Visual Studio 2019:
ASP.NET Core Web Application
Class Library (.NET Core)
Console App (.NET Core)
MSTest Test Project (.NET Core)
NUnit Test Project (.NET Core)
Web Driver Test for Edge (.NET Core)
Windows Forms App (.NET Core)
WPF App (.NET Core)
xUnit Test Project (.NET Core)
Figure 1-2 shows the start window with the Console App (.NET Core) template selected. You can also see the templates called ASP.NET Core Web Application and WPF App (.NET