Summary
The inventory import process may fail at the “Get Azure VM Instances” step of the Azure readers due to version mismatches between the modules rolled up in to the Azure Az PowerShell module and dependent Microsoft assembly versions.
Details
When this issue occurs, the import process fails with logging similar to:
2022-03-28 12:22:57,178 [INFO ] Get Azure VM Instances (Transfer data from source 'AzureTest' to FNMP) 2022-03-28 12:22:57,568 [INFO ] #ObjectModel_CloudServiceInstance_GetAzureVMInstances 2022-03-28 12:22:57,615 [WARN ] Warning! The maximum key length is 900 bytes. The index 'CK_#ObjectModel_CloudServiceInstance_GetAzureVMInstances' has maximum length of 1824 bytes. For some combination of large values, the insert/update operation will fail. 2022-03-28 12:23:14,729 [INFO ] Failed to execute Reader 'Get Azure VM Instances' from file C:\ProgramData\Flexera Software\Compliance\ImportProcedures\Inventory\Reader\microsoft azure\Instance.xml, at step line 1 Error: Please review the error message and correct the issue, then try again: Could not load file or assembly 'Azure.Core, Version=1.14.0.0, Culture=neutral, PublicKeyToken=92742159e12e44c8' or one of its dependencies. The system cannot find the file specified.
Another example of an error message associated with this issue is:
Error: The running command stopped because the preference variable "ErrorActionPreference" or common parameter is set to Stop: Could not load file or assembly 'Microsoft.Identity.Client, Version=4.38.0.0, Culture=neutral, PublicKeyToken=0a613f4dd989e8ae' or one of its dependencies. The system cannot find the file specified.
The exact assembly name, Version and PublicKeyToken details may vary based on exact component versions that are installed.
Workaround
Add content like the following to C:\Program Files (x86)\Flexera Software\FlexNet Manager Platform\DotNet\bin\ComplianceReader.exe.config to redirect the import process to use installed assembly versions:
<?xml version="1.0" encoding="utf-8"?> <configuration> <runtime> <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"> <dependentAssembly> <assemblyIdentity name="Azure.Core" publicKeyToken="92742159e12e44c8" culture="neutral" /> <bindingRedirect oldVersion="1.20.0.0" newVersion="1.21.0.0" /> </dependentAssembly> <dependentAssembly> <assemblyIdentity name="Microsoft.Identity.Client" publicKeyToken="0a613f4dd989e8ae" culture="neutral" /> <bindingRedirect oldVersion="4.30.0.0" newVersion="4.30.1.0" /> </dependentAssembly> <dependentAssembly> <assemblyIdentity name="Azure.Identity" publicKeyToken="92742159e12e44c8" culture="neutral" /> <bindingRedirect oldVersion="1.4.0.0" newVersion="1.5.0.0" /> </dependentAssembly> <dependentAssembly> <assemblyIdentity name="System.Buffers" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" /> <bindingRedirect oldVersion="4.0.2.0" newVersion="4.0.3.0" /> </dependentAssembly> </assemblyBinding> </runtime> </configuration>
The exact assembly details to specify (including the list of assemblies, and the publicKeyToken and version details) may vary based on the component versions that you have installed.
Related information
See the following page for information about installing PowerShell module prerequisites for the Azure connector: Microsoft Azure Connector > Prerequisites and Setting Up.
Related Articles
Known Issue: "Get Azure VM Instances" Azure import reader step may fail with error: "Could not load file or assembly '[...… 13Number of Views Could not load file or assembly 'sapnco_utils.dll' or one of its dependencies error 34Number of Views Import from Tanium may fail with error: "Could not find intermediate file for procedure Evidence, step 119 with name 'Get … 7Number of Views Config.ps1 or InstallCognos.ps1 script fails with error "Could not load file or assembly 'file:///...\Support\DotNetZip.dl… 21Number of Views "The system cannot find the file specified" when running ARL update 14Number of Views
Hi, I am Reva - Ask me anything.
No new updates
Thanks for the feedback!
Your feedback has been saved.Rate this response:
Add Additional feedback ( Optional )
Are you sure you want to cancel
the case creation?
Are you sure you want to cancel the case creation?
Are you sure you want to close this case
| Products | Region | Phone Numbers |
|---|---|---|
| FlexNet Operations FlexNet Embedded FlexNet Publisher FlexNet Connect FlexNet Code Insight InstallAnywhere InstallShield |
North America * |
+1 630-332-2513 (toll) +1 877-279-2853 (toll-free in North America) |
| Europe * |
+44 1925 944367 (toll) +44 800 047 8642 (toll-free in Europe) |
|
| Japan * | +81 3-4540-5335 (select option 2) | |
| Australia * |
+61 3 9895 2177 +61 1800 560 603 (toll-free in Australia) |
|
|
Usage Intelligence (formerly
Revulytics) Compliance Intelligence |
Please use the Case Portal to submit your support ticket or reach out to your Revenera contact. | |
Case id: 00001065
Activity: Status change: 2 hours ago