Skip to main content
s.matlock
Community Manager
Oct 13, 2023 12:27 PM UTC
Solved

Could not load file or assembly 'Google.Apis.Auth, Version=1.62.0.0, Culture=neutral

I have a c# code that generate a GCP token, When attach Program.cs to XModule get this error: Could not load file or assembly 'Google.Apis.Auth, Version=1.62.0.0, Culture=neutral, PublicKeyToken=4b01fa6e34db77ab' or one of its dependencies. The system cannot find the file specified.

My dll is referenced in configuration ReferencedLibraries in XModule and only this has error.

 

C:\Users\victor.grimaldo\Documents\dll\Google.Apis.dll;C:\Users\victor.grimaldo\Documents\dll\Newtonsoft.Json.dll;C:\Users\victor.grimaldo\Documents\dll\Google.Apis.Core.dll;C:\Users\victor.grimaldo\Documents\dll\Google.Apis.Auth.dll;

[Originally asked and solved on Support Hub]

Community Manager
Oct 13, 2023 12:28 PM UTC

You should copy dlls file to folder %TBOX_HOME% and just fill dll file name in parameter: ReferencedLibraries 

I usually create a Wrapper Class for functions use these dlls and this class is independent with TOSCA SpecicalEmbeddedTask code, then I just copy dll files to %TBOX_HOME%, don't need use parameter: ReferencedLibraries

1 reply

Community Manager
Oct 13, 2023 12:28 PM UTC

You should copy dlls file to folder %TBOX_HOME% and just fill dll file name in parameter: ReferencedLibraries 

I usually create a Wrapper Class for functions use these dlls and this class is independent with TOSCA SpecicalEmbeddedTask code, then I just copy dll files to %TBOX_HOME%, don't need use parameter: ReferencedLibraries