Use a .Net assembly in a store

The .Net assembly in a store may reference other assemblies. For example, the KTADotNetAssembly.dll references the following assemblies: TotalAgility.Sdk.Dll and CommonUtilities.Dll. The referenced assemblies can be merged together for TotalAgility to effectively use them as customer assets. To create a merged assembly, you can use the .NET utility ILMerge. Use this utility to modify the project settings within Visual Studio by including a Post Build Event as follows:

"..\..\ILMerge.exe" "KTADotNetAssembly.dll" "CommonUtilities.dll" /out:"Merged\KTADotNetAssemblyM.dll" /keyfile:“ILMerge.snk” /wildcards /targetplatform:v4,"%ProgramFiles%\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5.1"

  • TotalAgility.SDK.DLL does not require to be merged into the output assembly, as it will be picked up automatically by TotalAgility at runtime.

  • An output or merged assembly such as KTADotNetAssemblyM.dll, is created within the Merged folder.

  • Use the Microsoft .NET Framework 4.5.1 for ILMerge.

Create a key file using sn utility available in .NET Framework

  1. Run a Visual Studio Command Prompt.
  2. Type sn -k <name of the key file>.snk (for example, sn -k kofax.snk).
  3. Open Visual Studio and open the solution.
  4. Select the project.
  5. Right-click the selected project and click Properties.
  6. Click Signing.
  7. Select Sign the assembly.
  8. On the Choose a strong name key file list, select the file name that is newly created.

    The .NET Assembly for a store must have a strong name and a different assembly version each time it is updated in the store.

  9. Click Save.

Auto incrementing the assembly version

  1. Open Visual Studio and open the solution.
  2. Select the project.
  3. Right-click the selected project and click Properties > Application > Assembly Information.
  4. In the Assembly version field, enter the version. For example, to start version, enter 1.0.0.*.

    Alternatively, you can also set the version in the assemblyinfo.cs file.

  5. Click OK.