Visual Studio Control Add-in Project Template
If part of your daily job includes creating control add-ins for Microsoft Dynamics NAV, then you know that creating control add-ins that target all clients requires quite a lot manual work. There are a lot of small steps that you must do every time.
To avoid all that work that adds no value, only frustration, here’s a Visual Studio project template that you can use to automate the process of creating a new control add-in.
Then, to install it on your machiine, take the ZIP file you downloaded, and put it to:
Documents\Visual Studio 20xx\Templates\ProjectTemplates
Just place the ZIP there, no need to unpack anythinig.
To use it, (re)start Visual Studio, and then in your New Project windows, select Templaces>Visual C#, then scroll to the bottom and select this little guy:
Then set the name of the project, click OK, and you have your new shiny control add-in project structure in place.
To make full use of it:
Choose a strong name file to sign the project with. The PowerShell script that runs after building will remind you of this if you forget.
Edit the IControlAddIn.cs file to change the value of the Control AddInExport attribute.
At this stage, you can already press F6 to build it, and it will immediately find its way into Control Add-ins page in NAV, together with the resource file.
After first build, PowerShell script will create the Resource subfolder and create a default resource file structure and a manifest file in there. The files are present inside the project folder, but are not part of the project. It's a good idea to make them a part of the project, so do this:
In Solution Explorer, click the Show All Files icon
Right click the Resources folder
Click Include in Project
Have fun creating your new control add-ins, and let me know if you find this little tool useful.