Installing and registering .NET SDK DLLs manually

In order you could work with the Sage CRM .NET SDK, the following DLL assemblies must be installed to the GAC (Global Assembly Cache) folder and properly registered:

  • SageCrmEntityWizard.dll. Installed and registered by the .NET SDK Setup.
  • SageCRMNet.dll. Installed and registered by the main Sage CRM Setup.
  • SageCrmWrapper.dll. Installed and registered by the main Sage CRM Setup.

In .NET Framework 2.0, the default location of the Global Assembly Cache is %windir%\assembly.

However, in some situations the automatic installation and registration of the above assemblies may fail. In this case, you may receive an error message when you install the .NET SDK or create a new C# project from a template supplied with the .NET SDK. The error you receive may be similar to the following: "This template attempted to load an untrusted component".

To fix this issue, manually install and register the assemblies, as follows:

  1. On the computer where the Sage CRM .NET SDK is installed, open Visual Studio Command Prompt.
  2. Change directory to the folder where the above-listed DLL assemblies are stored. By default, this is

    %ProgramFiles(x86)%\Sage\CRM\CrmDotNet\<Sage CRM version number>

    Example: cd %ProgramFiles(x86)%\Sage\CRM\CrmDotNet\2017

  3. Use the gacutil /if command to force the installation of each .NET SDK assembly.
    Example: gacutil /if sagecrmnet.dll
  4. Use the regasm command to register each installed .NET SDK assembly.
    Example: regasm sagecrmnet.dll