Building my 1st plug-in with Visual Studio 2017 (part 2)

Continuation of part 1 (https://community.sdl.com/developers/language-developers/f/61/t/14327).

I have gotten the basic plug-in working and am now on this step of the tutorial: http://producthelp.sdl.com/SDK/BatchTaskApi/1.0/html/1daf8da9-ea35-4dc7-a92b-31d20d9c8537.htm

The tutorial says to add a reference to 'Sdl.Core.Globalization', but VS17 says there is no 'Globalization' under 'Sdl.Core.Globalization'. There is a further error message as follows:

You must add a reference to assembly 'Sdl.Core.Globalization, Version=1.8.0.0, Culture=neutral, PublicKeyToken=c28cdb26c445c888'.

How can I get 'Sdl.Core.Globalization'?

EDIT 1: I just found 'Sdl.Core.Globalization.dll' in a number of places, e.g. 'C:\Program Files (x86)\SDL\SDL Trados Studio\Studio5'. How do I include it in my project? I guess I would need the header file!?

EDIT 2: Now I see that VS17 has 'Project | Add reference...'. But I have not yet found 'Sdl.Core.Globalization' there. Is that how to get the reference?

Thanks,

Gary Hess

Parents Reply
  • Thanks, that worked!

    Now when I try to compile, I am getting this error:

    'FileReader' does not contain a constructor that takes 2 arguments

    The class is defined as follows:

    public class FileReader : AbstractBilingualContentProcessor { ... }

    However, there are two arguments when a new FileReader object is created:

    FileReader _task = new FileReader(_settings, projectFile.LocalFilePath);

    Any idea why this is not working? I am trying to dig into this problem but I don't have much experience with C# and Visual Studio.

    EDIT: After reading about constructors in C#, I added the following line inside of the 'FileReader' class and the error has disappeared. But is there a better solution?

    public FileReader(MyCustomBatchTaskSettings _taskSettings, string _inputFilePath) { }

    Thanks,

    Gary

Children