Discover millions of ebooks, audiobooks, and so much more with a free trial

Only $11.99/month after trial. Cancel anytime.

Exploring the .NET Core 3.0 Runtime: Through Code Generation and Metadata Inspection
Exploring the .NET Core 3.0 Runtime: Through Code Generation and Metadata Inspection
Exploring the .NET Core 3.0 Runtime: Through Code Generation and Metadata Inspection
Ebook205 pages1 hour

Exploring the .NET Core 3.0 Runtime: Through Code Generation and Metadata Inspection

Rating: 0 out of 5 stars

()

Read preview

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. 


LanguageEnglish
PublisherApress
Release dateSep 6, 2019
ISBN9781484251133
Exploring the .NET Core 3.0 Runtime: Through Code Generation and Metadata Inspection

Related to Exploring the .NET Core 3.0 Runtime

Related ebooks

Programming For You

View More

Related articles

Reviews for Exploring the .NET Core 3.0 Runtime

Rating: 0 out of 5 stars
0 ratings

0 ratings0 reviews

What did you think?

Tap to rate

Review must be at least 10 words

    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.jpg

    Figure 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

    Enjoying the preview?
    Page 1 of 1