Dynamically loading assemblies at runtime

  • Reading time:6 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.

Continue ReadingDynamically loading assemblies at runtime

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

  • Reading time:9 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.

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

Sorting out the DLL hell, Part 3: The Code

  • Reading time:11 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.

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

Sorting out the DLL hell, Part 2: The Solution

  • Reading time:4 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.

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

Sorting out the DLL hell, Part 1: The Problem

  • 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.

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

Server Extensibility Demos

  • Reading time:1 min read

Yesterday, as a part of Microsoft’s Road To Repeatability program, I delivered a live meeting session about server extensibility in NAV in which I focused on certain areas of .NET Interoperability and Web Services that in my opinion align well with the R2R message.

As promised, here are the materials from the presentation:

I provide this as-is, with no comments, documentation or anything – you are free to use any of these materials in your projects, and I welcome your questions here about presentation content and demos. I’ll do my best to answer them on my earliest convenience.

I hope you enjoyed the presentation yesterday (if you were attending) and that you find these materials useful.

Continue ReadingServer Extensibility Demos

The “Life Hack” from today’s Session

  • Reading time:1 min read

And yes, I almost forgot… Somebody (sorry, I didn’t catch the name) asked me to put my life hack on the blog as well, so here it is. For all of you who were not there, I use this as a template for declaring .NET variables – until Microsoft provides means to declare them in a simpler ways. Inline, anyone?

So – download the life hack, or cheat sheet, here: https://vjeko.com/wp-content/uploads/2014/11/Life_Hack_No_1.docx

Continue ReadingThe “Life Hack” from today’s Session

DEmos from the .NET Interop for Mere Mortals

  • Reading time:1 min read

Thanks to everybody who attended my session today at NAV TechDays 2014 in Antwerp. As promised, here are the goodies from the session. I’ve simply taken the objects and I deliver them here with no explanations or comments – when Luc publishes the sessions and the slide decks on Mibuso, you’ll be able to figure out what’s what. I hope you don’t mind.

I’ve also included my demo from the PRS session today, about the Service Locator pattern. The ZIP file does not include the Visual Studio solution – you can find it in my previous post, that I’ve put here yesterday.

I hope you find these examples useful and that they help you get started with .NET Interop quickly.

Download the files here: https://vjeko.com/wp-content/uploads/2014/11/NAVTechDays2014.MereMortals.zip.

Continue ReadingDEmos from the .NET Interop for Mere Mortals

NAV TechDays 2014 Pre-conference goodies

  • Reading time:1 min read

So, NAV TechDays 2014 have started, again, with the pre-conference sessions that were all sold out and packed full.

Today I had an extraordinary pleasure to teach the advanced .NET Interoperability concepts to 15 people that came from all over the world, from Brazil to Australia. It was an interesting workshop, challenging – I must say (thanks to Rafael who made me improvise a solution to a typical DotNet limitation), and I am looking forward to delivering two more sessions about .NET and Control Add-ins tomorrow, and on Friday.

As promised, I am making the materials from the presentation available for the download, in case you want to learn the same stuff the attendees learned today.

Continue ReadingNAV TechDays 2014 Pre-conference goodies

NavUserAccountHelper class

  • Reading time:3 mins read

Even though my blog queue has a lot of far more interesting todo entries waiting for their prime time, on my short flight to the Directions EMEA conference in Poznań, instead of dozing away or blank-staring through the window, I’ve decided to introduce the Microsoft.Dynamics.Nav.NavUserAccount.NavUserAccountHelper class, a part of the built-in .NET stack of Microsoft Dynamics NAV since the version 2013 R2. My friend, Eric, asked me to blog about it, so here it is, this post is for you, Eric.

Continue ReadingNavUserAccountHelper class