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!
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
Post a Comment