Automatic Deployment of Microsoft .NET Framework Interoperability and Control Add-in Assemblies in NAV 2015
Sitting here at the airport in Copenhagen with my laptop waiting for my ride home to Iceland.
I wanted to write about a topic that I did not hear or see in Directions during this week. Windows Client add-ins are now automatically downloaded from the server to the client if they are needed.
A fellow MVP Arend-Jan has already blogged about this but I want to explain a little bit more.
There are a few rules to follow to make sure that this works. First is the assembly name. The assembly name must be “Microsoft.Dynamics.Nav.Client.<Class Name>” if the server is supposed to find it.
Put each new assembly in a dedicated folder in the server add-ins folder. If other components are needed for this assembly then put them in the same folder. The server will copy the whole folder to the client.
In the Developement Environment make sure that your server is selected in Tools-Options.
Then when looking for an assembly a new option is to look in the server add-ins folder.
Adding an assembly into your code to run at the client will now work without any further actions.
And now – when I print to Excel the new Excel window opens in front of Dynamics NAV 2015.
To quote Microsoft directly:
“Automatic Deployment of Microsoft .NET Framework Interoperability and Control Add-in Assemblies
Microsoft Dynamics NAV 2015 makes it easier for the system administrators to deploy client-side assemblies for .NET Framework interoperability and client control add-ins on computers that are running the Microsoft Dynamics NAV Windows client or Microsoft Dynamics NAV Development Environment. You can now install the assemblies in the Add-ins folder on the computer that is running Microsoft Dynamics NAV Server. By default, this is the C:\Program Files\Microsoft Dynamics NAV\80\Service\Add-ins folder. When an operation from the client requires an assembly, Microsoft Dynamics NAV Server automatically deploys the assembly to a temporary folder on the client computer.
For example, if Microsoft Dynamics NAV Windows client opens a page that contains a control add-in, Microsoft Dynamics NAV Server will find the control add-in assembly by name in the Add-ins folder. Then, it deploys the assembly to the client computer in the %TEMP%\Microsoft Dynamics NAV\Add-Ins folder of user who is running the client. Subsequently, the deployed assembly will be used whenever the page is opened.
Similarly, if the development environment requires a control add-in, for example, when you compile an object, then the control add-in assembly will be deployed by the Microsoft Dynamics NAV Server to the local temporary folder for the current user on the computer that is running the development environment.
To be deployed, an assembly must comply with the following Microsoft Dynamics NAV Server configuration settings: Chuck Size, Max Upload Size, and Prohibited File Types.
If a .NET Framework interoperability or control add-in assembly is updated and its version number changes, Microsoft Dynamics NAV Server will deploy the updated assembly to the client computer the next time that the client requests the assembly. The updated assembly is put in a subfolder of the %TEMP%\Microsoft Dynamics NAV\Add-Ins folder, where the subfolder has the assembly’s version number as its name. This implementation means that you do have to remove the older versions of assemblies that are stored on the client computer.