Today I have a treat for all the Visual Studio Tools developers out there.
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.
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.
Nice. Thank you.
I was looking for an update tool for my addin so this comes in at the perfect time.
Just a few days ago, I read an article (found it on Google) that described your idea. I quickly tried it. I must have done something wrong because it did not work for me.
I just tried your suggestion now. It works. Thanks again.
Great tool, and great concept! We deploy over Citrix - this will save us a lot of headaches and hassle.
Thanks guys ! I am glad you like it. It saved me so much time, I couldn't hold myself for sharing :)
Posting by Mark Polino from DynamicAccounting.net
Boy, today is my lucky day! I was browsing David’s site and found two treasures within fifteen minutes.
First, it was the VSToolsDAGUtility from Srinivas Ramidi, and now this!
I’m starting an upgrade tomorrow and this will be a big help.
Thank you Luc for sharing your brilliance with us peasants!
PLEASE READ BEFORE POSTING
Please only post comments relating to the topic of this page.
If you wish to ask a technical question, please use the links in the links section (scroll down, on right hand side) to ask on the Newsgroups or Forums. If you ask on the Newsgroups or Forums, others in the community can respond and the answers are available for everyone in the future.