Unblock a DLL on Windows Server 2012 and Windows 10

It has been very quiet at my blog for the last two months. The main reason for this is the go-live of a big NAV2016 upgrade I’ve been working on for the last half year or so.

This blog is related to this project. We are using some DLLs for this project. Among them are Anveo and ForNAV.

Sometimes you get a new version of a dll from one of your vendors. In some cases windows might prevent you from using them. You have to unblock it explicitly.

This is the error message you might get:


“Cannot create an instance of the following .NET Framework object”

Reason is that you need to go to the properties of the DLL and manually unblock it.


After this is done you can use the DLL. You need Administrator previledges.

9 thoughts on “Unblock a DLL on Windows Server 2012 and Windows 10

  1. Pingback: Unblock a DLL on Windows Server 2012 and Windows 10 - Mark Brummel - Author of Microsoft Dynamics NAV 2013 Application Design

  2. Robert

    thanks for posting this as I ran into the same issue two weeks ago with some Powershell scripts that I downloaded from GitHub and once I located the “unblock” button problem solved. Only remaining issue is how to unblock entire directories of scripts;

    Liked by 1 person

  3. eernst

    Hi Mark,
    Have seen that. But somehow my own PC (Windows 10) nor any of my Windows servers I have the unblock function. So luckily you can use a powershell command to unblock it instead:
    get-childitem -Recurse | unblock-file

    Liked by 1 person

  4. Vytenis Jakas

    Hi Mark,

    If you need to “unlock” a whole bunch of them, there’s a far simpler way than using PowerShell or what not. This particular “locking” mechanism is actually related to a feature of the Windows file system (NTFS Alternate Data Streams). When a file is saved from an e-mail or downloaded from Internet, a certain property gets set on it in the file system, which prevents Windows from executing it.

    Solution: a simple an easy way to unblock a bunch of dlls, it to copy them to a non-NTFS drive (i.e. FAT formated USB drive or just another non-NTFS drive) and back.

    Liked by 1 person

  5. thegunzo

    You need to be running as an administrator to unblock a file directly in the add-ins folder. One option is to run File Explorer as an administrator, another is to run powershell as an administrator and the third; move the file to your desktop, unblock it, and move it back up to the add-ins folder.

    Liked by 1 person

  6. Pingback: Unblock a DLL on Windows Server 2012 and Windows 10 | Pardaan.com

Leave a Reply to Vytenis Jakas Cancel reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.