Skip to main content

ASP.net Core 1 Projects on .NET Core 2

A small post for today although something I think could trip others up.  I'm trying out the latest WebJobs 3.0 beta which is a port of the 2.0 version with .net Core 2.0 support.  This is really exciting as .net Core projects are considerably easier to work with than .net 4.x.  There tends to be less magic and they're a lot more command line friendly.

One issue is that in order to use the new WebJobs 3.0 library, my current ASP.net Core 1.x web applications need to be running on .net Core 2 to use it for dispatch.  This hasn't been too much of a hassle, it was largely just a matter of updating the TargetFramework entry in my csproj to netcoreapp2.0.  You may also end up with a few other items to clean up after that as the netcoreapp2.0 TFM comes with some useful configurations out of the box to ensure well behaved .net 4.6 PCLs are easier to get into your projects.

The one surprise I hit was that when I shipped things up to Azure App Service, I got a fairly hard error saying "failed to load sni.dll".  Turns out that once running on the more stripped down Azure environment, the version that ended up being resolved during build was not correct.

The solution ended up being fairly simple, but because the error only happened on Azure, it was tough to track down.  I just had to install version 4.4.0 of System.Data.SqlClient to my data access project and I was back in action!
In case you're wondering, the project I'm upgrading is somewhat tied to the claims APIs in 1.x.  I'm for sure tracking a task to migrate to whatever version is current when the time avails itself.  But it's great to know that I'm not going to fall behind and can take newer versions of other libraries orthogonal to the web project itself.

As promised, this was a nice short one!

Comments

Popular posts from this blog

Laravel is Good, Facades Aren't

I've been working on some Laravel 4 based packages lately which inevitably results in me also looking at other packages. I've noticed sometimes that people use facades at times that give me pause. The most troubling being from inside their model classes. A quick google turned up this video which assures people "there's still an instance behind everything, we're fine" .  Everything mentioned in the video is true except that there is a very glaring omission. Scope What usually goes out the door at the start of a long series of mishaps in software design is scope . When the desire to obtain a solution is stronger than the desire to consider the implications of a firm approach, mistakes are sure to follow.  Sacrifices like this are made due to the assumption of a high cost to developing carefully. What really is happening however is a false dilemma , being responded to with a convenience decision . It's very easy to write model code like ...

Amazon in Winnipeg?

Late last week, Amazon put word out that they're starting to look for a city to locate a second headquarters .  The fuel this announcement provides has the hype train in Winnipeg going so fast, it's missing stops. I'm curious though.  As you've been digesting this exciting news, who have you spoken or listened to? Was it this guy  and his party's historic theft of public infrastructure (pdf) and incompetence with digital strategy ? Or how about this guy , who maintains that Winnipeg doesn't need a proper rapid transit option ?  You know, the kind that might actually catch the eye of handsome Amazon who now has Winnipeg trying to be the belle of the ball. Transit "system", Peggo glitches are free - thanks  @infidelatheist Runner up articles are  Winnipeg's inability to join the 21st centry on active transport  and the  compounding of the aforementioned digital strategy mistakes . Stop Listening to These Guys They are not technol...

Building .NET Core Nuget Packages

My last blog post was on building and publishing npm packages, specifically for typescript projects. In my opinion, packages are an important fundamental unit in software development. They sit at the confluence of technical competence and collaboration, and represent something the software community should be proud of. Most of the time, you're going to be creating software packages once you're comfortable with some essential pillars: Coding Project structure Software architecture Building Delivery Community Licensing After I got my npm package up and running, my next task was to do the same thing with my C# libraries. Similar to protoculture, I have made a library called praxis .  This is done by leveraging the services and tooling known in the .NET ecosystem as nuget. In this case, praxis abstracts many of the concepts and functionality I require when producing server projects. It builds on top of ASP.NET Core, so in that sense you can almost think of it as ...