Well...
This might not be so hard after all.
Check this DLL out. It works as a TS plugin, and I think it implements IPlugin for your editor as well.
To try this at home, from the Visual Studio 2010 command prompt:
C:\spherestudio\Sphere.Plugins>csc /target:module
/r:"C:\GitHub\spherestudio\Sphere Editor\Libs\dockpanel
suite\WeifenLuo.WinFormsUI.Docking.dll" IPlugin.cs IPluginHost.cs Properties\As
semblyInfo.cs
That makes IPlugin.netmodule.
C:\turbospheresrc\plugins\getkeystring>cl /c /
MD getkeystring.cpp
Which makes getkeystring.obj. Put them in the same directory.
C:\turbospheresrc\plugins\getkeystring>link /L
TCG /DLL /ASSEMBLYMODULE:IPlugin.netmodule "../../lib/v8.lib" /OUT
:fatplugin.dll getkeystring.obj IPlugin.netmodule
Which makes fatplugin.dll. I have no idea how well it works as a Sphere Studio plugin, but it is a completely working TurboSphere plugin that replaces getkeystring, and is 4kb (about the size of the IPlugin.netmodule) larger than the normal getkeystring.dll.
It would be another matter to have it call common routines from both sides (if the C# side is really working correctly at all). But I for one think this is better already than having two separate plugin files for a single purpose.
EDIT:
Well...I see now what that actually did. Clearly not what is needed to make the C# code I wanted to be put into the dll.
I'm going to try to figure out how to get the command line output from Visual C#.