Hi all,
I'm trying to use 3rd party nugets, Google.Cloud.Monitoring.V3 and Google.Cloud.Storage, and I am getting the following error:
This is running on a console application just fine with the same nugets, however when I transfer the code to a driver, it breaks. When looking at the dllimports of the qaction in the xml, we will notice some duplicate dlls:
Unfortunately, removing those duplicates manually does not seem to work.
Since the actual dlls needed are there, it seems like this is an issue with the way DIS imports the dlls -> DataMiner is using the wrong dll version. Could these be imported incorrectly?
DIS Version: 2.41.1.7
DMA Version: (10.1.0.0-12267-CU20)
If you'd like more info/to test: Reach out to Joey V. Also, Google Cloud Compute Engine driver is on GIT. Read the commit notes for setup.
Thanks in advance,
Alex Johnson
Hi Alex,
The implementation in DataMiner is different from a regular console application. This is because by default there is a single SLScripting process to execute the QAction code and therefore binding redirects cannot be used. The current design provides all versions of the assemblies used, where for one version the full path is provided (compile time) and for the other versions the folder path is provided (run time). More info can be found here.
We are currently investigating the cause of the exception in your driver.
You probably ran into one of the issues mentioned here: https://learn.microsoft.com/en-us/dotnet/framework/deployment/best-practices-for-assembly-loading#avoid_loading_multiple_versions. While in theory you could use a bindingRedirects on SLScripting to solve it, it would not be recommended as it might interfere with other protocols. (Side note: DIS currently also does not support NuGet packages that have runtime-specific DLLs included so if your NuGet packages make use of this this will not work). An alternative solution would be to create a process that implements the Cloud monitoring API with which the protocol would communicate.