Dynamically loading assemblies at runtime

  • Post comments:7 Comments
  • Reading time:7 mins read

When you spend more time in C# than C/AL, and you still tell yourself and the world around you that you are developing for NAV, then this post is for you.

I already wrote a three-article series about “DLL hell” and how to resolve it, and in my last post in the series (https://vjeko.com/sorting-out-the-dll-hell-part-3-the-code) I delivered some code that help you take control of your .NET assemblies.

This time, I am delivering an updated solution, one that solves all the problems others, and myself, have encountered in the meantime.

So, fasten the seatbelt, and let’s embark on another .NET interoperability black belt ride.

(more…)

Continue ReadingDynamically loading assemblies at runtime

Database deployment of add-ins in NAV 2016 is broken, big time

  • Post comments:8 Comments
  • Reading time:10 mins read

If you are developing .NET assemblies for use with NAV, then sooner or later you’ll figure out that the new database deployment of add-ins in NAV 2016 is broken.

I’ve just suffered through medieval torture of attempting to have my NAV forget about a database-deployed assembly.

First of all – if you are merely consuming an off-the-shelf assemblies developed by somebody out there, you’ll probably not need to worry at all. However, if you are developing your own assemblies, then sooner or later you’ll find yourself stretched in exactly the same torture rack.

(more…)

Continue ReadingDatabase deployment of add-ins in NAV 2016 is broken, big time

Sorting out the DLL hell, Part 3: The Code

  • Post comments:58 Comments
  • Reading time:16 mins read

[Update, February 8, 2016: there is a new version of code from this post. Please check https://vjeko.com/dynamically-loading-assemblies-at-runtime]

Okay here we go. In this post I deliver the promised code that handles automatic deployment of all your assemblies to client and server, as needed.

For any of you who haven’t read the last two posts, I am talking about automatically deploying .NET assemblies to clients and server, from the database, on demand, at runtime.

This will be heavy on code, so fasten your seatbelt and brace for impact.

(more…)

Continue ReadingSorting out the DLL hell, Part 3: The Code

Sorting out the DLL hell, Part 2: The Solution

  • Post comments:7 Comments
  • Reading time:5 mins read

Deploying .NET assemblies to clients and servers in need is no simple affair. In my last post I have explained the problem, and announced the solution.

As promised, in this post I bring you the solution.

To be fully honest, this post only brings the conceptual solution, just a little brain game for you to train your .NET brain muscles a bit. The actual code I’ll deliver in the next post.

(more…)

Continue ReadingSorting out the DLL hell, Part 2: The Solution

Sorting out the DLL hell, Part 1: The Problem

  • Post comments:12 Comments
  • Reading time:6 mins read

Let me tell you right away if you need to read this post at all. If you never wrote a single .NET class library intended to be used as a .NET interoperability assembly from C/AL, or if you never ever deployed a .dll file into the Add-ins folder of either Service or RoleTailored Client, then you probably don’t want to read this post.

Good, since you are still reading it means that you either deployed your own or somebody else’s .NET stuff into NAV’s client or server’s Add-ins folders. If you ever did so, you probably did not enjoy the experience too much. If you did enjoy the experience, maybe you should not read any further either.

Even better! Since you are still here it means that you didn’t enjoy deploying assemblies. Let me break some good news – all your problems are now gone! And I am not talking NAV 2016, I am talking NAV 2013 and anything newer.

(more…)

Continue ReadingSorting out the DLL hell, Part 1: The Problem