.NET Core 3.0 Single-File Apps

Build & Publish Single-File Self-Contained Applications, Then Make Them Smaller!

Self-contained deployments aren’t new to .NET Core, but when you build a self-contained application you typically end up with a massive deployment folder filled with every possible DLL you’d need, and then some. Keep reading and I’ll tell you how to avoid that with .NET Core 3.0. Single-File Executables Imagine that the dotnet publish command created just one file rather than creating directory with a few hundred files. With . [Read More]

Run .NET Core 2.2 Apps on Your Raspberry Pi

Install the .NET Core 2.2 Runtime on a Raspberry Pi and Run Your Own Apps

Did you know that Linux ARM32 is an officially supported distro for .NET Core? That’s pretty exciting if you’re at all into IOT or tinkering with Raspberry Pi or other devices. So whether you’ve got a Raspberry Pi you’re using as a desktop, media center, application server, robot, environment monitor, or something else, you can now build & push your own .NET Core code to it and take more control over it. [Read More]

Measuring .NET Core Test Coverage with Coverlet

Measure your .NET Core Xunit Code Coverage and Generate HTML Reports!

I love working with .NET Core on the command line (CLI) and Visual Studio Code. Until recently getting code coverage metrics for your .NET Core projects had required using Visual Studio or a 3rd party paid tool. With the introduction of Coverlet you can now generate code coverage metrics on the command line, and the further process the collected data into reports using Report Generator. Interested? Read on and I’ll explain how and provide link a sample project at the end of this post. [Read More]

Sending HTML Templated Emails From .NET Core 2.0

A super simple way to sending email from your .NET Core applications

As of .NET Core 2.0 the SMTP Client and classes you’ll need to send email have been ported over to .NET Core. Here I’ll quickly show you how to send email from your .NET Core applications. Sending Email From .NET Core 2.0 The first thing you need to do is ensure your project is .NET Core 2.0 or higher. If you’re not sure, check your .csproj file, you should see something like this: <TargetFramework>netcoreapp2. [Read More]

.Net Core Configurations

Managing Multiple .NET Core Application Environment Configurations With Well Organized JSON Config Files

.NET Core gives you the ability to easily manage configurations for your application across multiple environments (eg: local, dev, production, etc). Read on to find out how to set your environment on the command line and even for Docker. Startup Methods For .NET Core 1.x & 2.0 Projects For your .NET Core 1.x projects, your Startup.cs should contain code along the lines of: public Startup(IHostingEnvironment env) { var builder = new ConfigurationBuilder() . [Read More]

.Net Core In A Container

How To Run a .NET Core API Inside a Docker Container

Using Docker With .NET Core Docker is an incredibly popular software container platform. If you don’t know what it is read more about it here. Docker for Windows I’m running Windows 10 and using Docker for Windows. The most important thing to mention is that as of writing this Docker for Windows only runs on 64 bit Windows 10 Pro, Enterprise and Education. Check the Docker for Windows page for the full requirements. [Read More]

The .Net Core CLI

How to Get Started Using the .NET Core Command Line

A lot has changed in the land of .NET Core since my last blog post. For me, the best change is the .NET Core tooling. The command line interface (CLI) has really been greatly improved. I’d previously recommended yeoman to setup a new .NET Core project, but now for most scenarios I use the CLI. The .NET Core CLI Basic Commands The .NET Core CLI gives you a quick easy way to do things like: [Read More]

Setting Up Your .Net Core Environment

Get .NET Core Up and Running In No Time At All With the .NET CLI and VS Code

There are a lot of blog posts and articles about .NET core. Most of them are focused on developing .NET core applications through Visual Studio. That’s great, but I know a lot of .NET developers view the console more like this: Let’s change that. This will be the first in a series of posts focusing on using the command line and VS Code to develop, build, and maybe even deploy some . [Read More]