Install the assemblies into the Global Assembly Cache
The assemblies for a custom workflow action must be installed into the Global Assembly Cache (GAC) of the server for the SharePoint 2013 farm.
Note: The assemblies for a custom workflow action must be strongly named. Ensure that, before you compile your assemblies, that you create a strong name key file and sign each assembly included in the custom workflow action. For more information about signing assemblies, see Creating and Using Strong-Named Assemblies.
There are two recommended options for manually installing the assemblies and related files for the custom workflow action into the GAC:
-
Windows Installer
You can create a Windows Installer package in Visual Studio for the custom workflow action, to install the assemblies for the custom workflow action into the GAC.
Tip: Use this option for testing or production purposes. This option is recommended for installing assemblies into production installations.
For more information about creating a Windows Installer package in Visual Studio, see Windows Installer Deployment.
-
Global Assembly Cache tool
You can use the Global Assembly Cache tool to manually install the assemblies and related files for the workflow activity and the workflow action adapter into the GAC from a command prompt.
Caution: Use this option for testing purposes only. This option is not recommended for installing assemblies into production installations.
To install an assembly into the GAC from a command prompt
-
Start Command Prompt, as an administrator.
-
In Command Prompt, run the following command, replacing <assemblyPath> with the full path and file name of the assembly:
gacutil /i <assemblyPath>
For more information about using the Global Assembly Cache tool, see How to: Install an Assembly into the Global Assembly Cache.
Recommendations
-
Use an assembly list to install multiple assemblies
Instead of using the /i option with the Global Assembly Cache tool to install just a single assembly, and invoking the tool multiple times to install the assemblies fora custom workflow action, you can use an assembly list file and the /il option to install multiple assemblies in a single invocation of the tool. The assembly list file is an ANSI text file that, for installation, contains the relative paths and file names of the assemblies to be installed. The declared path of each assembly in the file should be relative to the location of the assembly list file.
-
Manually move program database (.pdb) files into the GAC
After installing the assemblies into the GAC, you can manually move program database files into the GAC for remote debugging. If the assemblies are compiled in debug mode and the corresponding program database files are moved into the GAC, you can then attach the Visual Studio remote debugger to the Internet Information Services (IIS) worker process, w3wp.exe, to troubleshoot or test the assemblies for the custom workflow action when that action is used in a Nintex workflow.
To move a program database file into the GAC
-
Start Command Prompt, as an administrator.
-
In Command Prompt, run the following command:
cd %WINDIR%\Microsoft.NET\assembly\GAC_MSIL
Note: The specified location is the GAC for all assemblies that target .NET Framework 4.0 and later versions. Do not use %windir%\assembly, the location of the GAC for all assemblies that target earlier versions of .NET Framework.
-
Run the following command, replacing <AssemblyGACPath> with the relative path of the folder in the GAC containing the assembly for the program database file
cd <AssemblyGACPath>
Tip: Typically, the path of an assembly in the GAC uses the following format, replacing <Name> with the name of the assembly, <Target> with the .NET Framework target version for the assembly, <Version> with the four-part version number of the assembly, and <PublicKey> with the public key of the assembly:
<Name>\<Target>_<Version>__<PublicKey>
For example, the relative path of the assembly for the workflow activity included in the ExecuteSqlScalar sample is:
Crestan.WorkflowActivities\v4.0_1.0.0.0__e5daa473dcec272b -
Run the following command, replacing <PDBPath> with the full path and file name of the program database file:
copy <PDBPath> .
-
-
See Also
Concepts
Operations
Deploying workflow actions with Nintex Workflow Management
Working with workflow activities
Implementing the workflow action adapter