Hello everyone,
I am developing my own plugin - Terminology provider, and I want to use my own files as databases for lemmatization. These file are located in the C# project subfolder but the
issue is that I cannot use a relative path to that folder in my code (e.g.: "..\Databases\nameOfTheFile") because during the runtime of the plugin, current directory
is the directory of the Trados Studio 2022. Is there a way how to get a path of my plugin project/solution so I can use the relative path or the only option is
to actually manually copy the files to the Trados Studio directory first and then I can use the relative path in my code? I tried multiple way how to get a current directory
in my code but always got only 2 results (Directory of the Trados Studio or Plugin packages folder in AppData where is the plugin built).
For reference:
string originalDirectory = Directory.GetCurrentDirectory(); // This returns directory of the Trados Studio (e.g.: C:\Program Files (x86)\Trados\Trados Studio\Studio17)
string pluginBuildDirectory = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location); //This returns AppData plugins build directory (%AppData%\Trados\Trados Studio\17\Plugins\Packages\ )
Is there an option to resolve this issue, or do you have any suggestions for the best approach to utilize these files?
Kind Regards,
Denis Filo