I am constantly running into a run-time error when referencing the .Net C# Eikon API from within a Console App/Class Library.
An unhandled exception of type 'ThomsonReuters.Desktop.SDK.DataAccess.TinyIoCResolutionException' occurred in ThomsonReuters.Desktop.SDK.DataAccess.dll Additional information: Unable to resolve type: ThomsonReuters.Desktop.SDK.DataAccess.IInternalDataServices occurred
For example, I use the following sample code that you provide at : https://developers.refinitiv.com/en/api-catalog/eikon/-net-apis-for-use-in-custom-applications/download
Specifically the project: Usage Example Time series API
I finally, after many hours of debugging isolated the real issue as follows:
Each time I compile my code, one or some of the dependencies copies older versions of the following 4 files into the /bin/debug or /bin/release folder:
I18nResource.dll
EikonPipeDll.dll
msvcp120.dll
msvcr120.dll
The only way any of the code works is with the newest versions of the above files in the binary folder. In my current case those are the DLLs from Nov 16, 2017, which I fetched from my C:\ProgramFiles (x86)\ThomsonReuters\... folder. As soon as I rebuild the project, older files of Nov 24, 2015 overwrite the newer files and I get the exception as indicated above.
What can I do in order to retain the 4 newest dependencies? Please note that even automated copying of the files in the Post-Build Event Command line does not work because somehow the generation of those 4 files is somehow delayed and seems to occur after the post-build events already complete.
Also, another big issue is that those 4 files are necessary in any project binary folders that may wrap around the Reuters API. For example, when I set up a test project that references my Reuters API wrapper then those 4 files need to be present in the binary folder of such test project as well , otherwise above exception will be thrown. However, unlike with all other dependencies which are automatically copied into the binary folders of projects that reference objects that rely on such dependencies, those 4 above files are not copied at all.
Can you please tell me whether there is a more professional solution out there for anyone with a paid Eikon desktop license and who wants to access data via the .Net API than being forced to use numerous HACKS to make it work? Sorry if this comes across as being overly aggressive. But I have been dealing with this issue for over a year now, on and off, and now coming back to this I still find the same exact problems bubbling up. I pointed out this problem in multiple other threads. I was clearly able to isolate the problem and someone of the Reuters developer team should be able to easily reproduce this error.
In response to answer regarding post-built event:
I could only see the following, the problem I have is that the files are copied but only old files which cause the throwing of runtime exceptions:
<Target Name="EikonSdkIpc_CopyNativeDependencies" AfterTargets="AfterBuild"> <Error Condition="!Exists('..\..\..\packages\ThomsonReuters.Udap.Ipc.Signed.x64.2.10.5\tools\EikonPipeDll.dll')" Text="This project needs a file provided by a NuGet package that is missing on this computer. Enable NuGet Package Restore to download it. For more information, see http://go.microsoft.com/fwlink/?LinkID=317567." HelpKeyword="EIKONSDKBUILD0001" /> <Copy Condition="Exists('..\..\..\packages\ThomsonReuters.Udap.Ipc.Signed.x64.2.10.5\tools\EikonPipeDll.dll')" SourceFiles="..\..\..\packages\ThomsonReuters.Udap.Ipc.Signed.x64.2.10.5\tools\EikonPipeDll.dll" DestinationFolder="$(OutputPath)" ContinueOnError="True" /> <Error Condition="!Exists('..\..\..\packages\ThomsonReuters.Udap.Ipc.Signed.x64.2.10.5\tools\i18nresource.dll')" Text="This project needs a file provided by a NuGet package that is missing on this computer. Enable NuGet Package Restore to download it. For more information, see http://go.microsoft.com/fwlink/?LinkID=317567." HelpKeyword="EIKONSDKBUILD0001" /> <Copy Condition="Exists('..\..\..\packages\ThomsonReuters.Udap.Ipc.Signed.x64.2.10.5\tools\i18nresource.dll')" SourceFiles="..\..\..\packages\ThomsonReuters.Udap.Ipc.Signed.x64.2.10.5\tools\i18nresource.dll" DestinationFolder="$(OutputPath)" ContinueOnError="True" /> <Error Condition="!Exists('..\..\..\packages\ThomsonReuters.Udap.Ipc.Signed.x64.2.10.5\tools\msvcp120.dll')" Text="This project needs a file provided by a NuGet package that is missing on this computer. Enable NuGet Package Restore to download it. For more information, see http://go.microsoft.com/fwlink/?LinkID=317567." HelpKeyword="EIKONSDKBUILD0001" /> <Copy Condition="Exists('..\..\..\packages\ThomsonReuters.Udap.Ipc.Signed.x64.2.10.5\tools\msvcp120.dll')" SourceFiles="..\..\..\packages\ThomsonReuters.Udap.Ipc.Signed.x64.2.10.5\tools\msvcp120.dll" DestinationFolder="$(OutputPath)" ContinueOnError="True" /> <Error Condition="!Exists('..\..\..\packages\ThomsonReuters.Udap.Ipc.Signed.x64.2.10.5\tools\msvcr120.dll')" Text="This project needs a file provided by a NuGet package that is missing on this computer. Enable NuGet Package Restore to download it. For more information, see http://go.microsoft.com/fwlink/?LinkID=317567." HelpKeyword="EIKONSDKBUILD0001" /> <Copy Condition="Exists('..\..\..\packages\ThomsonReuters.Udap.Ipc.Signed.x64.2.10.5\tools\msvcr120.dll')" SourceFiles="..\..\..\packages\ThomsonReuters.Udap.Ipc.Signed.x64.2.10.5\tools\msvcr120.dll" DestinationFolder="$(OutputPath)" ContinueOnError="True" /> </Target>