cromica / Studio-AssemblyResolver

Assembly resolver for SDL Studio standalone applications
Apache License 2.0
2 stars 5 forks source link

Resolve() not working #2

Open ysavourel opened 7 years ago

ysavourel commented 7 years ago

I'm trying to run an application that uses the Studio API and can't run it from the Studio directory for various reasons. I've tried to use the latest version of AssemblyResolver (seems to be 0.1.5.0) and place the call to Resolve() in my main entry point before calling any Studio API. But I get the same error related to not finding plugin folder when checking for the license. I'm working with Visual Studio 2017 (and Trados Studio 2015) Any idea why?

ysavourel commented 7 years ago

I'm not sure if the cause of that error of not finding the plugins folder when checking for the license is in the AssemblyResolver.

I ran a test program to that tries to create a project and run Resolve() before, with some breakpoints in the currentDomain_AssemblyResolve method and got the following calls before the exception:

args.Name = Sdl.Desktop.Platform.resources, Version=4.0.0.0, Culture=en-US, PublicKeyToken=c28cdb26c445c888 assemblyPath = C:\Program Files (x86)\SDL\SDL Trados Studio\Studio4\Sdl.Desktop.Platform.resources.dll args.Name = Sdl.Desktop.Platform.resources, Version=4.0.0.0, Culture=en-US, PublicKeyToken=c28cdb26c445c888 assemblyPath = C:\Program Files (x86)\SDL\SDL Trados Studio\Studio4\Sdl.Desktop.Platform.resources.dll args.Name = Sdl.Desktop.Platform.resources, Version=4.0.0.0, Culture=en, PublicKeyToken=c28cdb26c445c888 assemblyPath = C:\Program Files (x86)\SDL\SDL Trados Studio\Studio4\Sdl.Desktop.Platform.resources.dll args.Name = Sdl.Desktop.Platform.resources, Version=4.0.0.0, Culture=en, PublicKeyToken=c28cdb26c445c888 assemblyPath = C:\Program Files (x86)\SDL\SDL Trados Studio\Studio4\Sdl.Desktop.Platform.resources.dll args.Name = Sdl.ProjectApi.resources, Version=12.0.0.0, Culture=en-US, PublicKeyToken=c28cdb26c445c888 assemblyPath = C:\Program Files (x86)\SDL\SDL Trados Studio\Studio4\Sdl.ProjectApi.resources.dll args.Name = Sdl.ProjectApi.resources, Version=12.0.0.0, Culture=en-US, PublicKeyToken=c28cdb26c445c888 assemblyPath = C:\Program Files (x86)\SDL\SDL Trados Studio\Studio4\Sdl.ProjectApi.resources.dll args.Name = Sdl.ProjectApi.resources, Version=12.0.0.0, Culture=en, PublicKeyToken=c28cdb26c445c888 assemblyPath = C:\Program Files (x86)\SDL\SDL Trados Studio\Studio4\Sdl.ProjectApi.resources.dll args.Name = Sdl.ProjectApi.resources, Version=12.0.0.0, Culture=en, PublicKeyToken=c28cdb26c445c888 assemblyPath = C:\Program Files (x86)\SDL\SDL Trados Studio\Studio4\Sdl.ProjectApi.resources.dll As you can see it seems the only DLLs searched there are for the resources.

Any suggestions would be welcome. Thanks, -ys