Cover

Updating WilderBlog to ASPNETCore 1.1

January 11, 2017
No Comments.

I upgraded my WilderBlog project to ASP.NET Core 1.1 today. I had planned on writing a big blog post about how to accomplish it, but I was surprised instead by how uneventful the process was.

Some of my students were using ASP.NET Core 1.1 in their walk through using my Pluralsight course and I was unsure of how much of a problem that was going to be, but so far no problems really.

So to upgrade my WilderBlog project, I did two uneventful things:

I installed the 1.1 SDK

I updated the project.json of both projects I’m still using (The WilderBlog.Commands project isn’t being used right now).

You can get the 1.1 SDK by visiting the download page:

https://www.microsoft.com/net/download/core

When you get to that page, pick the ‘current’ version (not the Long Term Support version) and download the SDK for your operating system. Note that the download package is named 1.0.0, not 1.1.0 which really confused  me but it’s the right version.

Next, I opened up my project.json’s and made two search and replace changes:

Changed “1.0.0” to “1.1.0

Changes “1.0.0-preview2-final” to “1.1.0-preview4-final” in all the tools

I also needed to change the framework I was building against. To do this, I had to change the netcoreapp1.0 to netcoreapp1.1 and the version of “Microsoft.NETCore.App” to 1.1.0 too (though the copy/replace should have fixed that already):

  "frameworks": {
    "netcoreapp1.1": {
      "imports": [
        "dotnet5.6",
        "dnxcore50",
        "portable-net45+win8"
      ],
      "dependencies": {
        "Microsoft.NETCore.App": {
          "version": "1.1.0",
          "type": "platform"
        }
      }
    }
  },

I built the project and it just worked. Yeah, really.

The only other change I needed to do was to include a global.json file to point at the right SDK (I didn’t have one before for some reason):

{
  "projects": [ "src" ],
  "sdk": {
    "version": "1.0.0-preview2-1-003177"
  }
}

This was even more confusing, the 1.1 SDK has this version name right now. If you look in your C:\program files\dotnet\sdk folder, you’ll see the names (note that if you’re on Mac or Linux, you have the same thing but in different places).

The global.json was only necessary for me because I was using Azure Websites’ Git Deployment integration. And it uses this to know what SDK to use.

If you want to see the code for WilderBlog with it’s updates, you can find it here:

https://github.com/shawnwildermuth/wilderblog

Let me know if you see anything wonky in your upgrading to 1.1.