You need to put this in a strong named assembly and add it to the GAC.
After creating the expiration action, you need to register it by creating an XML file. you will find an example below. the featureid attribute of the policyresource element is important. this needs to be the ID of the out of the box expiration policy. the rest is pretty clear. save this XML to a file called "actionmanifest. XML"
<?XML Version="1.0" Encoding="UTF-8"?>
<P: policyresource ID="Tst. POC. policyfeatures. expirationsendwarning"
Featureid="Microsoft. Office. recordsmanagement. policyfeatures. Expiration"
Type="Action"Xmlns: P="URN: Schemas-Microsoft-com: Office: SERVER: Policy">
<P: localizationresources>Dlccore</P: localizationresources>
<P: Name>Expirationsendwarning</P: Name>
<P: Description>Sends a warning on the reminder date</P: Description>
<P: publisher>Ton stegeman</P: publisher>
<P: assemblyname>
Tst. POC. policyoftruth, version = 1.0.0.0, culture = neutral,
Publickeytoken = 503edd7b21a1_b3
</P: assemblyname>
<P: classname>Tst. POC. policyfeatures. expirationsendwarning</P: classname>
</P: policyresource>
Step 3-register the expiration action
The last step is to register the action. To do that, you run the example piece of code below from any type of application you like best:
StringActionmanifest = system. Io.File. Readalltext ("Actionmanifest. xml");
Policyresourcecollection. Add (actionmanifest );
The policyresourcecollection can be found in the namespace "Microsoft. Office. recordsmanagement. informationpolicy". Both for Step 1 and 3 you need a reference to Microsoft. Office. Policy. dll