IPB

Welcome Guest ( Log In | Register )

> Howto: remove web limitations from plugin SDK, for all languages, the easy way
timothy
post Jun 27 2006, 08:29 PM
Post #1



Group Icon

Group: Timothy
Posts: 771
Joined: 1-September 04
From: Netherlands
Member No.: 3



Kudos to Strandberg from the MSDN forum for pointing out strong naming and gac.

The messenger plug-in SDK is a tad useless because it doesn’t allows you to read/write to files, make web calls, create proper forms, or actually do anything but sending pre-made messages. This is caused by the fact that its running with the web limitation by default.

So here's the easy way to register your plug-in and allow it to use everything C#/VB.net/J#/etc has to offer, like:

System.IO;
System.Xml;
System.Interop;


Step one. Sign your DLL file, this allows your plugin to be identified propperly by the system. (also see jpg attachment)

1 - Select from the project menu the option "<myplugin> properties".
2 - Choose the tab Signing.
3 - Check Sign the assembly
4 - From the dropdown choose <new>
5 - Enter your key name (ie your plug-in name) and a password
6 - Now your plug-in will be signed every time you recompile it

Step two. Register your plug-in with GAC. This will place your plug-in in a cache so if you change something you'd need to un-register it first and reregister it.

Step two A. Register it manually:

Open a explorer and goto C:\windows\assembly. Here you will find your GAC cache, drag drop your signed plugin here and it will be added to the list. If you recompile your plugin, you will need to remove the old cache first, then drag drop the new file.

Step two B. Register it (semi) automatic:

Place the following lines in a bat file in your dll folder, and run it everytime you recompile it:
CODE

echo off
cls
echo ----------------
"C:\Program Files\Microsoft Visual Studio 8\SDK\v2.0\Bin\gacutil.exe" /u <pluginspace>
echo ----------------
"C:\Program Files\Microsoft Visual Studio 8\SDK\v2.0\Bin\gacutil.exe" /i <pluginspace>.dll
echo ----------------
pause


*) Replace <pluginspace> with the assembly's name space, you can find this in the dll's name. So if you have a plug-in called MyPlugin.dll the <pluginspace> would be MyPlugin.

**) Make sure the path to the .net 2.0 SDK is the same, otherwise try to locate gacutil.exe on your own computer.
Attached File(s)
Attached File  sign.jpg ( 99.86K ) Number of downloads: 882
 
Go to the top of the page
 
+Quote Post

Posts in this topic


Reply to this topicStart new topic

 



RSS Lo-Fi Version Time is now: 31st July 2010 - 08:45 PM
© 2004-2008 Seb Skuse, mess.be.
MessForum v6.1.4 - created for, and for use only by mess.be.