3rdpartyassemblies (1)

3rd Party Assemblies and SDL Trados Studio Plugins

Last week I was working on a new plugin for SDL Trados Studio 2014 and I wanted to serialize some information in json. The best tool to handle this type of operations in .NET, at least in my opinion, is Json.NET. It made perfect sense to use it but until now I didn’t use any external dependencies in an SDL Trados Studio plugin so I started to look into what options we have to deploy our plugins together with 3rd party assemblies.

SDL Trados Studio Plugins

This is not a detailed look at what SDL Trados Studio plugins are but I want to give a bit of context on how they are working. First of all each plugin has to be packed in a package with extension.sldplugin (this a zip file in essence). If you use the SDL Trados Studio templates from Visual Studio this done for you automatically. Once you have the package you need to deploy it in one of the three location where SDL Trados Studio is expecting plugins:

  1. $(CurrentUser)\AppData\Local\SDL\SDL Trados Studio{Studio Version}\Plugins\Packages\
  2. $(CurrentUser)\AppData\Roaming\SDL\SDL Trados Studio{Studio Version}\Plugins\Packages\
  3. $(ProgramData)\SDL\SDL Trados Studio{Studio Version}\Plugins\Packages\

Deploy 3rd party assemblies

Now that we have a brief understanding on how SDL Trados Studio handles plugins let’s see what options we have to deploy 3rd party plugins:

  1. Include the assemblies in the plugin package
  2. Create an installer which will copy the 3rd party assemblies into SDL Trados Studio folder under $(ProgramFiles)

Although the second option can work I don’t like it because it requires more work, administrative rights to deploy the assemblies and might interfere with Studio installation. This was also suggest by David Fritch in this thread as a possible way to do it.

I consider the first option the right way to do it since it’s very simple and clean. All you have to do is change the pluginpackage.manifest.xml which has to be part of the solution in order to generate the .sdlplugin file. By default this xml file contains some tags to specify the plugin name, version, description, author and required SDL Trados Studio product. You will need to add an<Include> tag which in my case, for Json.NET, looked something like this:

You can have a look at my entire xml file here.

Please leave a comment if you have any questions or feedback.

This article first appeared on RomulusCrisan.com