Including additional .dlls in a .sdlplugin package

I'm toying a bit with making a plugin for Studio. I have managed to get the project set up and it builds a package, which works just fine in Studio. However, the package does not include the additional .dlls (apart from the SDL ones) that my project references. I can of course add them manually after building the package, but there has to be a better (as in automatic) way. Otherwise this is a serious deficiency in the Studio SDK. Adding dlls manually quickly gets annoying.

Parents
  • Similar problem here:

    I need to include the Json.net library in the .sdlplugin file. It is no problem for me to add the .dll to the .sdlplugin file after Visual Studio is done building, but when SDL Trados extracts the packaged plugin, the dll file is not in the 'Unpacked/<pluginname>' directory. I see two ways out of this situation, but I could not yet figure out how to do it exactly:

    1) I need to find out how to correctly add a file to a sdlplugin file, so that after the extraction done by Trados, these additional files are in the plugin folder.

    2) I need to find out how to build the .sdlplugin file correctly in the first place, so that Visual Studio includes the referenced dlls or, alternatively, builds the whole source code I reference and includes that in the .sdlplugin file. This, however leads to another problem:

    2.1) If (which is the case for me) the referenced Visual Studio Project is not signed, it can not be referenced from a signed Project.

    Any help is appreciated. My personal opinion is that a solution to problem (1) is probably a better long-term solution for several reasons:

    - The current SDL SDK offers templates for VS 2010, which is currently not the newest version, so it is not unlikely that a solution for VS 2010 will break in future versions of VS.

    - Not everyone owns Visual Studio, which should especially be considered seeing that the SDK requires the use of C#, which could easily be platform independent through Mono.

    - Maybe I want to include files other than .dlls, so there is no easy way to tell VS to include these files in the build.

    - ...

    Best

    Michael

  • Hi,

    can you check Building a plug-in topic in the Integration API 1.0 Preliminary Documentation?

    Here you can see that you can use simple structure to notify build task that more files must be included:

     <Include>

       <File>MyAssembly.dll</File>

     </Include>

    Regards

    Patrik

  • Hi Patrik,

    thanks for that hint, I did not see that before. However, VS 2010 C# Express completely ignores my <Include> entries to this file. I am sure to be using the right file, because when I change for example the version number, it also changes in the built plugin.

    The Includes to nothing, in fact the entry is removed from the built plugin's pluginpackage.manifest.xml.

    Any help is appreciated.

    Best

    Michael

  • I was finally able to manage to build a valid .sdlplugin file which extracts all the files I want. I had to do it manually. This was the most hacky solution I ever had to do with an official SDK/API. Thanks to Patrik who pointed me to the (pretty preliminary) Documentation at producthelp.sdl.com/.../index.aspx. There I read: "Every third-party plug-in has to be deployed using an SDL Plug-in Package (*.sdlplugin). This is an OPC-based file format, [...]". I read about this OPC format, and realized that Trados will only extract the files listed in the _rels/pluginpackage.manifest.rels.xml file. So what I did was manually edit this file after the .sdlplugin file was created and add my custom dll to the package.

    This is obviously quite a hack and since the _rels/pluginpackage.manifest.rels.xml file contains IDs for the contained files, this will break sooner or later. Also, I pity the fool that will have to reuse my code and rebild the plugin any time in the future.

    Still, any help on why VS C# Express 2010 did not compile the .sdlplugin file correctly from my plugin manifest is highly appreciated.

    Best, Michael

Reply
  • I was finally able to manage to build a valid .sdlplugin file which extracts all the files I want. I had to do it manually. This was the most hacky solution I ever had to do with an official SDK/API. Thanks to Patrik who pointed me to the (pretty preliminary) Documentation at producthelp.sdl.com/.../index.aspx. There I read: "Every third-party plug-in has to be deployed using an SDL Plug-in Package (*.sdlplugin). This is an OPC-based file format, [...]". I read about this OPC format, and realized that Trados will only extract the files listed in the _rels/pluginpackage.manifest.rels.xml file. So what I did was manually edit this file after the .sdlplugin file was created and add my custom dll to the package.

    This is obviously quite a hack and since the _rels/pluginpackage.manifest.rels.xml file contains IDs for the contained files, this will break sooner or later. Also, I pity the fool that will have to reuse my code and rebild the plugin any time in the future.

    Still, any help on why VS C# Express 2010 did not compile the .sdlplugin file correctly from my plugin manifest is highly appreciated.

    Best, Michael

Children