Building Cross-platform Applications with .NET Core
Are you interested in building cross-platform .NET applications? This course walks you through the steps of creating console apps, services and even web endpoints with the .NET Core platform.
What you'll learn
The .NET platform has been revolutionized with the advent of .NET Core. A platform once limited primarily to Windows is now officially supported on just about any platform that you'd like to develop and run applications. In this course, Building Cross-platform Applications with .NET Core, you'll learn how to develop and run .NET Core apps on a variety of platforms. You'll learn how to publish your app to run on different runtimes as well as understand different deployment models and how to test both platform agnostic and platform specific functionality. You'll see how to work with files, app configuration, logging, and dependency injection. You'll also learn how to build console app, services and web endpoints to see that you can create just about any type of app. Finally you'll get an update on the state .of the .NET Core tooling that's still being developed including the latest changes to use the MSBuild project system. By the time you're done, you'll know what it takes to successfully develop a cross-platform .NET Core application.
Table of contents
- Overview 1m
- The State of .NET Core 4m
- Choosing Development Tools 4m
- How to Get the Latest SDK Builds 3m
- Creating a Console App with dotnet new 4m
- The New .NET Core MSBuild Project System 5m
- The Goal Is a Clean MSBuild Project File 3m
- Build and Run the Console App on a Mac 2m
- Build and Run on Windows 2m
- Build and Run on Linux via Docker and Custom Docker Images 6m
- You Can Work with Both an IDE and the dotnet CLI 5m
- Creating a Solution File with Visual Studio 2m
- You Can Create Projects with an IDE Too 1m
- Finding an API to Make a Web Request 3m
- Using an API Bundled with .NET Core to Make Web Requests 2m
- Is This NuGet Package Compatible with .NET Core? 9m
- Extracting Links with HtmlAgilityPack 3m
- Adding Packages in the Project File or with the dotnet CLI 2m
- Running the Latest Code on Other Platforms 1m
- Introduction 1m
- Deployment Options 7m
- dotnet publish to Create a Framework Dependent Deployment 4m
- Diff dotnet build vs. dotnet publish Output 3m
- FDD to Windows 2m
- FDD to Linux via Docker 2m
- What if the Target Platform Does not Have the Runtime? 2m
- Specifying RuntimeIdentifiers 3m
- dotnet publish to Create a Self Contained Deployment 4m
- What Happens if you Do Not Specify the RID in the Project? 3m
- SCDs Also Contain an Executable 3m
- Pre-reqs Must be Present When Using an SCD 1m
- SCD to Windows 2m
- Pros and Cons of FDD vs. SCD 2m
- FDD Release Build 3m
- Building a Linux Container Image with a Console App 5m
- You Can Distribute Your App Only in a Linux Container Image 2m
- Container Images Have Best of Both FDD and SCD 3m
- Run Linux Container on Windows 2m
- The Container Image Contains Your App Files 1m
- There Is Also a .NET Core SDK Image 1m
- Creating a Test Project 3m
- Adding a dotnet new Project to a Solution 1m
- Where I See an Opportunity to Benefit from Automated Testing 3m
- ProjectReferences Are Much More Concise 4m
- dotnet add - To Add a Project Reference 2m
- Running Tests in Your IDE and Platform of Choice 3m
- dotnet test to Execute Tests on Multiple Platforms 3m
- How Much Testing Makes Sense per Platform 6m
- Introduction 1m
- The System.IO Namespace 1m
- Getting a Temporary File Name 2m
- Learning from the Open Source .NET Core Platform Specific Code 5m
- Temporary Files in Unix Type Environments 2m
- Writing to a Temporary File 1m
- Combining Paths with Path.Combine 5m
- Parsing and Creating Directories 2m
- Write Report to Current Directory 2m
- Quiz - Check if the App Runs in Linux Too 2m
- Checking Link Existence 3m
- Writing to a File Using a Stream - File.CreateText 4m
- Reflecting on the Convenience of Cross-platform Testing 4m
- Introduction 1m
- One Configuration API to Rule Them All 4m
- Configuration Is Affiliated with ASP.NET Core 2m
- Configuring the Command Line Configuration Provider 3m
- Loading the Site from a Command Line Argument 3m
- Reading Configuration from Environment Variables 3m
- Configuration Provider Order Matters 3m
- Adding JSON Configuration 3m
- Adding inMemory Configuration 3m
- Adding Configuration Sections 4m
- Configuration Sections and Binding POCOs 5m
- Simplified Configuration Binding via Get 1m
- Refactoring Configuration into a Config Object 8m
- What Else There Is to Know About Configuration 3m
- Introduction 1m
- What Is Wrong with Console.WriteLine 2m
- The Microsoft.Extensions Packages 3m
- Adding the Microsoft.Extensions.Logging Packages 2m
- Using a LoggerFactory to Create a Logger to Log Messages 3m
- Logging to the Console 1m
- Choosing a Log Level 4m
- Changing the Minimum Log Level to Write to the Console 1m
- Logging to Multiple Destinations 2m
- Logging to the Debug Output Window 2m
- Logging to a File with Serilog 2m
- Sharing a LoggerFactory Instance 3m
- Accessing the Source Code for the Logging Framework 1m
- Using Fully Qualified Type Names for the Log Category 1m
- Adding Trace Level Log Messages 3m
- Different Minimum Levels per Logging Destination 1m
- Correlating Logs with Scoping 5m
- Identifying Related Logs with Event ID 2m
- Serilog Generates Event IDs 2m
- Structured Log Message Placeholders Can Be Queryable 4m
- Logging Exceptions 3m
- Logging Meets Configuration 6m
- Setting a Log Level per Category 3m
- Summary 2m
- Introduction 1m
- How to Access the Code Samples for this Module 1m
- Referencing the Microsoft.EntityFrameworkCore.SqlServer Package 3m
- Setting up a DbContext 4m
- Saving LinkCheckResults to Out Database 2m
- Starting MSSQL on Linux in a Container 4m
- Connecting with SSMS 1m
- Create a Links Database with SSMS 1m
- Writing Data on a Mac to MSSQL 1m
- Isolated DB Servers Are Incredibly Easy Thanks to Containers 1m
- Troubleshooting MSSQL on Linux in a Container - Accessing Logs 2m
- Starting MySQL in a Container 1m
- Creating a Links Table in the MySQL DB 1m
- Changing the App to Use the Official MySQL Provider 5m
- Switching to the Pomelo MySql EF Core Provider 3m
- Running PostgreSQL in a Container 1m
- Initializing a PostgreSQL Database 3m
- Changing the App to Use PostgreSQL 3m
- Hunting Down Namespaces 2m
- Containers Provide Flexibility for Cross-platform Development 3m
- There Are Plenty of Third Party ORMs Too 2m
- Creating a SQLite Database in a File 2m
- Changing the App to Use SQLite 3m
- Cross-platform SQL Based Migrations with Flyway 2m
- Configuring the Connection String 1m
- You Do Not Need an IRepository 5m
- Introduction 1m
- Adding Hangfire for Background Jobs 3m
- Configuring Hangfire and Running a Background Job Server 1m
- Running a Recurring Job with Hangfire 2m
- Checking Links Every Minute 5m
- Good Time to Turn Down Logging Verbosity 1m
- Moving from Console Hosted to a Background Service 1m
- Creating a Test Linux VM with Vagrant 1m
- Installing the .NET Core Runtime on Ubuntu 4m
- Deploying Your App to Your Ubuntu VM 4m
- Creating a systemd Service 4m
- Opening Your App in Visual Studio Code 3m
- Generating a Web Example Project 4m
- Adding a Blocking Web Endpoint to Your Service 6m
- Successfully Running Your systemd Service 4m
- Windows Service Considerations 5m
- Introduction 1m
- Sharing a Single LoggerFactory 2m
- Telling ASP.NET Core to Use Your LoggerFactory 3m
- How to Explicitly Access Services like ILoggerFactory 5m
- Looking at Registered Services 3m
- Resolving Other Services like Logger Of T 5m
- Fulfilling Dependencies of Dependencies 3m
- The Three Components of Service Registration 5m
- Understanding How a Service Is Resolved 2m
- Using Method Injection with the Startup Configure Method 2m
- Letting ASP.NET Core Create the LoggerFactory 4m
- Getting Back to Your Link Checking Job 1m
- Resolve 1m
- Registering CheckLinkJob as a Service 7m
- Debugging Custom Service Registrations 1m
- Using Constructor Injection with Your Services 4m
- Injecting App Configuration with IOptions of T 4m
- Registering App Configuration POCOs with DI 4m
- Creating a Separate SiteSettings POCO 4m
- Debugging the IConfigureOptions ServiceDescriptors 1m
- Cleaning up Configuration 3m
- Transitive Dependencies 4m
- Exercise - Try Wiring in Entity Framework Core to Use DI 3m
- The End 1m