Use a .Net assembly in a store
The .Net assembly in a store may reference other assemblies. For example, the KTADotNetAssembly.dll references the TotalAgility.Sdk.Dll and CommonUtilities.Dll. assemblies. The referenced assemblies must be merged for them to work as the store assembly. 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 the sn utility available in .NET Framework
- Run a Visual Studio Command Prompt.
- Type sn -k <name of the key file>.snk (for example, sn -k kofax.snk).
- Open Visual Studio and open the solution.
- Select the project.
- Right-click the selected project and click Properties.
- Click Signing.
- Select Sign the assembly.
-
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.
- Click Save.
Auto incrementing the assembly version
- Open Visual Studio and open the solution.
- Select the project.
- Right-click the selected project and click Properties > Application > Assembly Information.
-
In the
Assembly version field, enter the version. For example, to start the version, enter 1.0.0.*.
Alternatively, you can also set the version in the assemblyinfo.cs file.
- Click OK.