Mock Function call to force loading an assembly - how elegant!

New version of Microsoft.IdentityModel.Clients.ActiveDirectory (ADAL.NET) is out – good time to update!

There’s now a new version of the assembly Microsoft.IdentityModel.Clients.ActiveDirectory available – plenty of reasons to update right away! Let me offer you one hot take on the matter since the earlier 3.x -versions of the package had some issues. Why bother updating? In an earlier post, I described an issue I…Continue reading New version of Microsoft.IdentityModel.Clients.ActiveDirectory (ADAL.NET) is out – good time to update!

Mock Function call to force loading an assembly - how elegant!

A quick (and handy!) hack to force referenced assembly to getting copied to a project

Visual Studio failing to copy a referenced assembly to a project in build might lead to surprising runtime errors. This post will explain one method of fixing these issues, using Microsoft.IdentityModel.Clients.ActiveDirectory as the example – as earlier versions of that assembly had this issue! Problem After the build, you might get…Continue reading A quick (and handy!) hack to force referenced assembly to getting copied to a project

No Entity Framework provider found for the ADO.NET provider with invariant name 'System.Data.SqlClient'

Fixing the “No Entity Framework provider found for the ADO.NET provider with invariant name ‘System.Data.SqlClient'” error

This post describes the fix to THE “No Entity Framework provider found for the ADO.NET provider with invariant name ‘System.Data.SqlClient’” error, which Visual Studio throws at your face when you try to run an application on any Windows-based system (or which you’ve dug out of event logs). Also, your application is…Continue reading Fixing the “No Entity Framework provider found for the ADO.NET provider with invariant name ‘System.Data.SqlClient’” error

Spatial SQL types

Solving the “Spatial types and functions are not available …” -problem

This page describes multiple ways to fix the  ‘Spatial types and functions are not available for this provider because the assembly ‘Microsoft.SqlServer.Types’ version 10 or higher could not be found.‘ exception which comes up during debugging or publishing your program, app or service using DbGeography. Symptoms While running a console…Continue reading Solving the “Spatial types and functions are not available …” -problem

entity-framework-logo

Fixing the error: “Column XX in table dbo.YY is of a type that is invalid for use as a key column in an index.”

While using Entity Framework and code-first migrations, Entity Framework (EF) creates the indexes for you – but what if you need to create a custom one, explicitly based on a certain field/column? Then you’ll have to tell EF which one to use as a key column. Usually, it’s easy –…Continue reading Fixing the error: “Column XX in table dbo.YY is of a type that is invalid for use as a key column in an index.”