- Flexera Community
- :
- FlexNet Manager
- :
- FlexNet Manager Suite Known Issues
- :
- Known Issue: "Get Azure VM Instances" Azure import reader step may fail with error: "Could not load ...
- Subscribe to RSS Feed
- Mark as New
- Mark as Read
- Subscribe
- Printer Friendly Page
- Report Inappropriate Content
Known Issue: "Get Azure VM Instances" Azure import reader step may fail with error: "Could not load file or assembly '[...]' or one of its dependencies. The system cannot find the file specified." (IOK-991576)
Known Issue: "Get Azure VM Instances" Azure import reader step may fail with error: "Could not load file or assembly '[...]' or one of its dependencies. The system cannot find the file specified." (IOK-991576)
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.
Fix status
This issue is still open but not currently scheduled to be addressed.
Other information
Affected components: Integration: Azure, Inventory import (read/write/export)
Master issue ID: IOK-991576
Also known as: FNML-77158
Tip: If you have been impacted by this issue, please click the KUDOS button above. This helps to track the relative significance and importance of issues. Clicking on an option against "Was this article helpful?" also helps assess and improve the usefulness of content.