The Monsters Weekly - Episode 15 - 'ASP.NET Core on Docker'

Ah, at last we get to running ASP.NET Core on a Docker image! In this episode the monsters start up their simple ASP.NET Core application inside of a docker container running on a virtualized Linux environment. Learn what goes into a Docker file and how Docker Machine makes all this possible on Windows.

What is Middleware Anyway?

If you spend a bit of time around the net ASP.NET Core there is a word you’re going to hear thrown around a bunch and that is “middleware”. I find middleware to be a confusing term which doesn’t mean anything or perhaps means everything. Let’s figure out what middleware means and what sorts of middleware we can slot into ASP.NET Core.

Middleware sits between two pieces of software which talk with one another piece. It is responsible for connecting the softwares together and may intercede to alter the communication or even intercept it. I know what you’re thinking: that’s a super vague definition, by that definition almost everything is middleware. Yep. See why I consider the term to be so confusing? The software we use these days is hugely abstracted and there are a lot of layers. Any of these layers in between are middleware.

Middleware as a hamburger

The Monsters Weekly - Episode 14 - 'Docker'

Wait, isn’t this the ASP.net Monsters and not the Docker Monsters? It is but Docker and containers in general are going to be a big thing in the next few years and the ASP.NET rewrite has come just in time for them. In this episode monster Simon takes us through what docker is and what it is going to mean for development in the coming years.

The Monsters Weekly - Episode 13 - 'Basics of .NET Core'

What is the .NET framework and what does each part do? How does .NET Core differ from the full framework. In this episode monster Simon talks, at a high level about how the bits of the framework fit together. We also talk about why there are so many packages in your solution now and what advantage that gives you over the old monolithic approach to the .NET framework.

The Monsters Weekly - Episode 12 - 'Dependency Injection in ASP.NET Core'

What is dependency injection, and how can it be leveraged in your project? Monster James walks through the setup in an application as it is configured in the default project in ASP.NET Core and MVC Core in this episode of the Monsters Weekly.

The Monsters Weekly - Episode 11 'Yeomon Generators for ASP.NET Core and MVC'

If cross platform is going to be the song sung by the ASP.NET community, the console tooling is really going to have to keep step with other tech stacks. Yeomon generators for ASP.NET Core give developers the basics needed to avoid the requirement of crufting toghether projects and new files.

Building Your ASP.NET Core Project on AppVeyor

AppVeyor is a great continuous build/delivery service which is hosted in the cloud. You can think of it as a hosted alternative to TeamCity or Visual Studio Online. One of the best things is that it is free for open source projects. This makes it a popular choice for something like GenFu, our test data generation tool.

There are a couple of ways to set up AppVeyor for building a project like GenFu. You can put in place an AppVeyor.yml file which gives instructions about which steps to run to generate a build. Alternately you can put in place a powershell script to do the building. I opted for the latter because it is more portable to other build tools should it be necessary.

The first thing to do is to set up an AppVeyor account and hook it up to your source control. I signed in with github credentials so it was easy to locate the GenFu project which is, of course, hosted on github.

In the build tab I put in just a call to a powershell script.

Imgur

Fixing "Dnx Runtime package needs to be installed" error

I went to build an older project on which I hadn’t worked for a while and I found that running msbuild on the solution file like so

& "C:\Program Files (x86)\MSBuild\14.0\Bin\MSBuild.exe" .\GenFu.sln

resulted in an error which looked like

GetRuntimeToolingPathTarget:
Cannot find DNX runtime dnx-clr-win-x86.1.0.0-rc1-final in the folder: C:\Users\stimms\.dnx\runtimes
C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v14.0\DNX\Microsoft.DNX.targets(126,5): error : The Dnx Runtime package needs to be installed. See output window for more details. [C:\code\GenFu\src\GenFu\GenFu.xproj]

The Monsters Weekly - Episode 10 'Loading Settings From a Database in ASP.NET Core'

While configuration has been greatly simplified in ASP.NET Core, it won’t provide an answer for all the situations all of the time. One such case is when you need to save and load configuration settings from a database so, here, we’ll show you how.

The Monsters Weekly - Episode 9 - What Makes a Controller

With ASP.NET Core we have new options for the way we build out our controllers. Sure, the conventions we know are there, but today we have the option to use as much or as little of the base class as we like in MVC Core.