Automating control add-in development using gulp

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

Happy new year everyone! Last year was a bit slow for me, until the very end, when I churned out a year’s worth of posts just in two days. I hope this year to be a bit different, and let me kick-start it with a concept I’ve been playing with recently.

If you are into control add-ins development, chances are you’re familiar with my Visual Studio Project Template for control add-ins. It’s cool because it allows you to deploy all of your changes all the way over to NAV just by pressing F6. But it sucks because it’s based on Visual Studio, which is so… not 2019. It’s true, Microsoft never prescribed exactly which tool you should use to build your control add-ins once you’ve created the interface. It was entirely up to you. For me, Visual Studio used to be the tool of choice because in there you create the interface, and then why not just create everything in there.

But recently, I thought – why not using VS Code to develop control add-ins “v1” (that is: the control add-ins that work in pre-AL, pre-extensions “v2”, pre-NAV2018/BC environments)? If you, like me, still have to do those from time to time, but absolutely want to use VS Code instead of Visual Studio, then this post is for you.

Last month, I’ve decided to port all development work on a major control add-in from Visual Studio into VS Code. When I say “major”, I mean it: it’s 16K lines of JavaScript code in 138 source code files, not including 3rd party libraries. To automate that in Visual Studio, I used a hodge-podge of build tasks, Windows batch scripts, PowerShell scripts, external utilities for zipping and minification, and the first thing I did – stupid, I know – when I transferred all my work to VS Code was to automate all of my tasks exactly the same way. So, I took all the same batch scripts, configured them as VS Code tasks, and I was happy. Not. It was slow, and ugly.

And then I remembered gulp.

It’s funny, gulp should have been the first thing to cross my mind. But, while I knew it was there, I never did anything with it. But, how complicated can it be? It turned out, I was able to replace all of the automation I had earlier into one nice gulpfile.js and turn my entire development experience completely upside-down. It’s that good.

So, I decided to share a little bit of my learning path, lessons learned, hints, tips, tricks, and all else in a series of blog posts about how to automate control add-in development using gulp. This is the first post in the series of an unknown number of posts to follow up.

Disclaimer: this particular post is not a NAV 2018/BC/AL. This is (mostly) for pre-BC control add-in developers. However, a lot of gulp concepts I’ll talk about are readily applicable to AL and BC world.

(more…)

Continue ReadingAutomating control add-in development using gulp

Microsoft Dynamics NAV Managed Service Goodies

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

Over the course of creating my videos, I have created a number of demos, and massive amount of code (well, massive in relation to the duration of videos). So, with Microsoft’s agreement, I have published all of the demonstrated C# and PowerShell code to my GitHub repository.

If you haven’t watched the videos yet, then please do.

And then, just visit this:

https://github.com/vjekob/NAV-Managed-Service

(more…)

Continue ReadingMicrosoft Dynamics NAV Managed Service Goodies

How Do I: Win the World with Managed Service

  • Post comments:2 Comments
  • Reading time:3 mins read

Over the past month or so I was very busy with the Microsoft Dynamics NAV Managed Service for Partners. One part was in line of my work, where we were busy around the clock bringing our solution to Managed Service. The other part was creating a handful of videos for Microsoft to promote Managed Service.

Both were quite a ride, and now I have to show for some results.

(more…)

Continue ReadingHow Do I: Win the World with Managed Service

Deploying from Visual Studio, update

  • Post comments:1 Comment
  • Reading time:3 mins read

A few days ago I have published my PowerShell script that streamlines and automates deployment of control add-ins from Visual Studio. Over the past couple of days I have improved it a little bit, and fixed a few bugs, so here’s an updated version that is more resilient to your project structure, produces resource zips that NST not only extracts, but actually understands, and does a little more.

(more…)

Continue ReadingDeploying from Visual Studio, update

Deploying control add-ins during development in NAV 2016

  • Post comments:3 Comments
  • Reading time:15 mins read

Microsoft Dynamics NAV 2016 brings many new features, one of which is a set of PowerShell cmdlets to manage add-ins. These are:

While these cmdlets are certainly useful for installation and deployment, I find them even more useful during development. When I blogged about deploying resource files automatically during development some months ago, I showed how you could use PowerShell during build process in Visual Studio to invoke a codeunit that registers control add-ins. Now, in NAV 2016, these tasks are a lot simpler with these new cmdlets.

(more…)

Continue ReadingDeploying control add-ins during development in NAV 2016