The journey of my first XrmToolBox tool

So I created and published my first XrmToolBox tool and even got it validated. Here I want to share some information about my journey from start to finish. You can find my plugin in the XrmToolBox under Icon Gallery and also can take a look at the source code here.

The motivation

I wanted to create a XrmToolBox tool for quite some time now but so far I didn’t had either the guts or idea to drive my passion for development. Until that day when I, as to often, used the ribbon workbench to add a command to a form. Since I had no icon for that new command at hand I wondered if there are any icons in the instance I could use, at least for now until someone could make a specific one. So I ended up trying different combinations for a “Add Many” command and didn’t find any. Since there was no preview in the Workbench I had a hard time to find the an icon to use. That’s where I thought to myself what a wonderful world why can’t I preview all available images and icons?

The idea was born

So an Icon Gallery shall be my first tool. The mission was clear, but where to start? I headed over to the XrmToolBox website and under Documentation you can find a couple of topics for developers. I directly started with “Create your own tool for XrmToolBox” suggesting using a custom template. My weaker self cheered euphorically at the thought of having the tool already half-finished by a template. Installing it worked like charm and starting a new project with it as well.

The dev experience

A first look on whats provided I was delighted to see a control item with a command bar already in place as well as a plugin file. Since I use a 4k monitor and active scaling the visual designer of windows forms controls bugs a bit here and there. But as soon I realized how to dodge those bugs of the designer everything worked like perfectly for me. Whats also great is that a lot of useful custom controls are already accessible for you. Like the table container.

The example code that got shipped with the template was enough to get me going. It showed how to retrieve data, load and save a settings object as well has what information my plugin has to provide. It also provided a couple examples on how to use standard functions like displaying a notification to the user or how logging is built in.

So I was surprised how easy it was to start so I tweeted about it. Credits where credits are due and apparently they heard it the first time.

First time they heard that it is a good dev experience

This shows how important it is to show some appreciation publicly.

Release the kraken Icon Gallery

Publishing my new tool was a new kind of experience to me. I took 3 attempts to get it validated. It was also the first time I published an nuget package. To put it mildly: the tooling for nuget package creation isn’t that great. Same goes for the documentation of the nuspec file. I think there is room for some nice tooling inside visual studio.

To be able to publish my tool I needed to merge the assemblies, since I used an external package for SVG rendering. I am used to use ILMerge from my dynamics projects in the past. I survived a couple of struggles with it already so I was confident that it would be a walk in the part. Sadly it wasn’t but ore to that later. So I merged all required assemblies into one, made sure everything needed is merged. Package my first version, went to the deploy your tool in the tool library section to see what has to be done.

The documentation states that I have to go to this site to submit my tool that is available on the nuget servers (and fully indexed). On that page I nearly missed that:

A checklist to prepare my tool for validation? Awesome! And they did not lie. It REALLY is a checklist.

You can check the items on the list to see what you have done so you don’t miss anything. I would love to see that checklist on the submit page and make it required to check every point.

1. Attempt

So I packed and published my tool as a nuget package and submitted it to the XrmToolBox Tool Library. It was a cool journey to this point and it is awesome feeling to submit something – even something simple as an icon gallery. Than this happend:

I received an unpleasant E-Mail 🙁

So with all this great feeling, sometimes you are brought back down to earth. But whoever rejected my submission was so nice to tell me why. So what was the issue?

First issue was a mismatch between the nuget package version and the assembly version. I was damn sure that I updated everything accordingly when it struck me. I was so nervous about publishing I forgot to rebuild with the new version number … So rebuild and go!

Second issue was that I apparently set “Microsoft Corporation” as an author. Wait what? Where does this come from? I made a search through all files and did find nothing. Not one single file contains that string. So I again thought that I simply forgot to rebuild the solution after setting all information. I ran the tool in debug mode and it perfectly showed “SirKato” as the author. Package and update!

2. Attempt

Confident of victory to pass the validation I struck me hard that the second attempt was rejected as well. This time I got informed via a tweet.

I still what? Based on the confusion of the tweet I was sure it has be a first time this occurred. Where the heck does it come from? I double checked everything, I even checked the assembly using right click -> Settings -> Details. I got confirmed that the author was “SirKato”.

What else to do? I installed my tool manually into the XrmToolBox and yes. There it showed author “Microsoft Corporation”. Time for dotPeek to decompile the assembly and take a deeper look. Luckily for me dotPeek confirmed that the company attribute has the wrong value. Where does it come from?

With a lot of investigation it turned out that ILMerge was messing up my assembly attributes and always used the last input assembly attributes. Since I did not manage to get it working with ILMerge I switched to ILRepack and everything worked as expected. Package and update again!

3. Attempt

Finally good news again

DING DING DING! It got validated. It is now available on the Tool Library! And on top I apparently helped someone to fix an issue in another XrmToolBox tool =)


It was a great ride to create a XrmToolBox tool and I hope to have that experience again in the future.

I want to publicly thank the XrmToolBox team for being patient with my submission!

Leave a Reply

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

%d bloggers like this: