Visual Studio 2022 & Dynamics GP Addin Project Templates “install”
[Edit 2021-11-16] I have been maintaining the extension through to Visual Studio 2022 from VS2015 - i have updated this article a little for 2022
Lets face it, Visual Studio 2015 (VS2015) is here and it is awesome, thus drop what you are doing and start developing with it, right now! I’ve been enjoying the experience with all the new light bulb helpers etc. More than ever before, it feels like Visual Studio has my back. The other day I got around to getting the Dynamics GP project templates installed and blog it here for benefit of others.
My GP Dev hero and MVP, Mariano Gomez posted on his blog a how to do this for previous versions of VS, which worked a treat for me in the past, so time to apply the principle to the new version of visual studio, 2015. I found that I had to use a different command to get the templates to install after they were moved, so see below for the steps I performed.
Steps to follow for VS2015
This is my variation on Mariano’s work, please visit Mariano’s blog and praise him there at this blog post:
Thus for VS2022 follow those instructions, but for moving the templates, use the folder root:
VS2022- replace your edition of visual studio for {version}****
C:\Program Files\Microsoft Visual Studio\2022{version}\Common7\IDE
VS2015
C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE
where he uses:
C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE
Below are the C# templates moved to where they need to be (remember C# & VB.NET):
Now to install those templates into Visual Studio (i.e. make them available)
Use an elevated visual studio command prompt, to run the command (Shift right click):
Refer to this stack overflow comment and run the command shown, note this is a departure from Mariano’s post. Using the “devenv.exe /setup” simply didn’t work for me, however you may find different.
Stackoverflow: How to update Visual Studio Template Cache
Command to use is:
devenv /installvstemplates
Change into the IDE directory as shown in the screen shot below, then run the command.
Leave this command to execute, it took a 20 seconds on my fast machine. This refreshes the Visual Studio project template cache
Now opening VS2015 should show these templates under the new project option.
Out of interest, investigate these folders to see if the folders and files have moved into the ProjectTemplatesCache folders where they should now be (Project templates & Item templates).
Hopefully that should help those who need it. One thought from me is that there is now an “online” option when opening new project, that downloads templates from “online”, surely the GP templates could be hosted in there, thus avoid this hassle?