While at Microsoft Convergence 2012 Houston, I was approached by Luc St-Yves to discuss a tool that he was creating that would allow Visual Studio Tools Addins to be updated on a live system. This is especially useful on a terminal server or Citrix system where you cannot get every user to disconnect when you want to put an update into production.
This tool allows the latest version of the Addin code to be placed into the live system and all new sessions to use the new code. Existing sessions keep using the code that was current at the time the Dynamics GP application was started until they log out.
Luc is a business analyst since 1992 and has developed his skills managing different ERPs systems since 2000. He has performed ERP implementations and developed an expertise on numerous ERP systems. From his SQL and programming knowledge, he developed several customizations to help go the step ahead where ERP stops. He is a Microsoft Dynamics GP customer since 2011, working at Humanware Technologies, a company developing products for blinds and visually impaired people.
I will let Luc explain what the tool does….
Disclaimer: This method and tool while really useful are not supported by Microsoft. The code is written by a third party (Luc) is provided “as is” and no warranty is given or implied.
How to update your Visual Studio development for Dynamics GP while users are using it…..
Ever wonder? Ever been tired of asking your Dynamics GP users to log off because you need to update your customizations, when your changes are only affecting 1 or 2 users, and even then, are not quite rush?
Well here is the trick:
Windows does not allow you to delete currently used DLLs. But it allows you to MOVE THEM in another folder and will manage a pointer to the moved file for currently used DLLs by some processes!
Knowing this will let any developer who needs to update a current set of DLLs under Dynamics GP\AddIn folder LIVE ! All you have to do is create a subfolder under the AddIn folder, then move the current set of DLLs in this subfolder.
Then, you can copy a new set of updated DLLs under the AddIn folder which will be used by the next users who will log in.
The only thing is that you have to be fast between those 2 operations so that users would not login during the process, having a Dynamics GP not customized being open.
I managed to do this very often, manually, doing my CTRL+C to mark my new version of DLLs to be copied from my source folder, then creating the backup folder, moving the current DLLs into it and then clicking in the AddIn folder and quickly do my CTRL+V.
I then thought “Why wouldn’t I just create a small application that will manage this operation, create the backup folder, increment the backup version number, move the current DLLs to it and manage the copy of the new version, file by file? This would reduce the time it takes and bring it to almost 0.000001% of chances to have a user logging in during the process ?”
And here is an app !!!:
So here I come with this first version of GP AddIns live update tool.
The GP AddIns live update is a tool developed in Visual Studio 2008 VB.Net. It has been designed to ease the deployment of customizations made using Visual Studio and placed under the “AddIn” subfolder from “Microsoft Dynamics\GP” folder.
The application currently contains two different tools.
The main one will allow to mark the DLLs from a source folder and execute the update to a destination Dynamics GP AddIn subfolder, even while some users are currently using the replaced version, by moving the current used DLLs into a backup folder.
The second one will help you clean the old versions backup folders when they are no more useful to be kept.
- Do not deploy new DLLs version if the changes brought are not compatible with the old version currently used!
- You can still use this tool to deploy but if the changes your a deploying result by having the currently used version being replaced to crash, this tool will not do miracle.
- An example for this would be an SQL table alteration needed by the new version, which would have the old version to crash. In this case, you still have to ask all users to leave Dynamics GP.
In most cases, deploying new versions of our customizations will only affect a small group of users, sometimes only 1 to 3 users.
And in most cases, the changes does not affect the structure of tables but simply fix some glitches or brings up new features needed by some few users, and not affecting the currently used version. This tool is perfect for this situation.
It will allow you to deploy the new version of your customizations while they are being used (without updating the currently used DLLs until they close/reopen GP), and call only the few users you are impacting and ask them to close and reopen their Dynamics GP to have your changes.
Again, since most of the time these changes we apply are new features or bug fixes, it allows the user to finish what he is doing before closing its Dynamics GP since most of the time, they dont need the deployed changes right away.
The tool with its documentation is available from the following link:
I hope you enjoy this free tool. Please join me in thanking Luc for his work on this utility and post a thank-you comment.