Visual Studio Template Installation
Normally, the gSharp setup application installs the Visual Studio templates required for developing a gSharp calculation assembly. However, in some situations this may fail, requiring manual installation.
Template Installer
For manual installation of the gSharp Visual Studio developer templates, use the gSharp Template Installer:
Run GSharp.Template.Installer.exe, located in the installation folder you specified during gSharp setup—typically:
C:\Program Files\gHost Technology\gSharp
- PI Asset Framework
- Canary Asset Hierarchy


The installer displays the three most recent Visual Studio versions it detects. Check the versions you want to install the templates for, then click the Install button.
The installer installs each set of selected templates for all instances of Visual Studio displayed. Progress is shown during the process and ends with the final status message:
Once installed, the templates will appear in Visual Studio when creating a new project:

Template Installer Errors
If errors occur during installation, the installer will display them. These are usually due to insufficient permissions to write to the destination folder.
The main gSharp installer may also have indicated that there was a template installation error after installation.

Controlled Folder Access
One common reason for developer template installation errors is Controlled Folder Access (CFA), a feature in Windows Defender that silently blocks write access to protected folders for untrusted applications. Exactly what constitutes an untrusted application depends on many factors, some of which are known only to Windows Defender. The user's Documents folder is often affected, which is where Visual Studio templates are installed.
There are several ways to work around this:
-
Temporarily disable CFA
If CFA isn't enforced via group policy, you can turn it off temporarily:- Go to Settings → Privacy & Security → Windows Security → Virus & threat protection
- Scroll down to Ransomware protection and click Manage ransomware protection
- Toggle Controlled folder access off
- Run the template installer
- Toggle Controlled folder access back on
-
Allow the installer through CFA
If CFA is enforced via group policy:- Navigate to Manage ransomware protection (as above)
- Click Allow an app through Controlled folder access
- Add
GSharp.Template.Installer.exeto the allowed list
-
Manually copy template files
If the above solutions fail, you can manually copy the template files (because Windows Explorer is a trusted application):-
Before closing the template installer, go to:
%Temp%\GSharp.Templates\TemplatesThis is the temporary staging folder for template files.
-
Copy the contents of the
ItemTemplatesfolder to the corresponding Visual Studio folder.
For example, for Visual Studio 2022:%Temp%\GSharp.Templates\Templates\ItemTemplates
→ Documents\Visual Studio 2022\Templates\ItemTemplates -
Repeat for the
ProjectTemplatesfolder:%Temp%\GSharp.Templates\Templates\ProjectTemplates
→ Documents\Visual Studio 2022\Templates\ProjectTemplates -
Once finished, close the template installer to automatically delete the
%Temp%\GSharp.Templatesfolder.
-
These workarounds assume that the gSharp installer has already been run with the Developer Kit option selected. This option configures the environment required for the templates to function correctly.
Do not simply copy the template installer to another machine and expect it to work—if the Developer Kit has not been installed by the gSharp installer, the necessary setup steps will be missing.