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!

 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.

Why bother updating?

In an earlier post I described an issue I had with Microsoft.IdentityModel.Clients.ActiveDirectory.Platform not getting copied during the build in a referencing project. In 3.17.0, which came out this month, the issue is fixed! The new package actually contains separate DLLs for different platforms.

In essence this means, that from C#/.NET -developer’s standing point, the team has assimilated the Microsoft.IdentityModel.Clients.ActiveDirectory.Platform assembly, among other platform DLLs, into Microsoft.IdentityModel.Clients.ActiveDirectory package itself. Hence, you’ll need no more funky hacks to ensure the DLLs get copied! 🙂

What’s new with Microsoft.IdentityModel.Clients.ActiveDirectory 3.17?

Continue reading

A quick but unknown hack to force referenced assembly to getting copied to a project

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

Referenced assembly not getting copied to a project in build might lead to surprising runtime errors. This post will explain one method of fixing these issues.

Problem

After build, you might get this kind of error:

In my case, I had referenced both of these DLLs in my “class library project”, which provided my console program a lot of functionality:

  • Microsoft.IdentityModel.Clients.ActiveDirectory.Platform
  • Microsoft.IdentityModel.Clients.ActiveDirectory

Continue reading