TUlP2G - Creating a plug-in |
Setting up a TULP2G plug-in project
This section describes what steps to take to create an empty TULP2G plug-in using Visual Studio.NET, although the information on this list
is of such a generic nature that it should be useful if you use a different development tool as well. From there on plug-in specific
functionality can be added.
- Remember that TULP2G is based on the .NET 2.0 Framework, so use a platform for the plug-in that creates compatible components.
- Create a Class Library-project.
- Add a reference to TULP2G.Interface.
- Create a keypair to sign your assembly. Remember that TULP2G plug-ins must reside in strong-named assemblies, so signing is
mandatory. To create a keypair, follow these steps:
- Go to your project's directory using the commandline (cmd.exe).
- Enter: sn -k [filename] where [filename] is any name you want. Common use is to name it
assemblyname.keypair.snk, e.g. TULP2G.DefaultExport.keypair.snk.
- Modify your project's AssemblyInfo.cs so the AssemblyKeyFile points to the generated file. Remember the
file is looked for from the output location of your assembly, so if it's in the project directory, the path should be something
like ..\..\TULP2G.MyPlugin.keypair.snk. Don't forget to properly escape the string or put an @ in front of it.
- Change the AssemblyVersion-attribute in AssemblyInfo.cs to something without a wildcard. By default, it's set to
1.0.* which means the version will be incremented on every build. This is normally a good idea but since you'll want to store
test versions in the Global Assembly Cache(GAC), this would cause a lot of versions to be copied to the GAC.
- Add the required using statements to your .cs file. Typically, it's useful to always include the TULP2G
namespace and either the TULP2G.Input or TULP2G.Output namespace depending on whether you're creating an input or
output plug-in respectively.
- Add a PluginAttribute to your class describing the type of plug-in it is, e.g.:
[PluginAttribute(PluginTypes.Communication)] to create a Communication plug-in. Valid values in the PluginTypes
enumeration are Conversion, Communication, Export, Protocol and Tool.
- Derive your class from the interface corresponding to the type you've just picked. The currently existing interfaces are:
IConversionPlugin, ICommunicationPlugin, IExportPlugin, IProtocolPlugin and IToolPlugin.
Last Modified: Tuesday April 11 2006. © 2004-2006 Netherlands Forensic Institute.