Contributor
Contributor

Could not load VMware.Vim dll as doesn't have the strong name in Power CLI 6.5

Hi,

Till 6.5.0 Power CLI, VMware.Vim.dll was strong name enabled dlls. But from 6.5.1, those dll's are not strongly named dll's.

In PowerShell gallery based installation also, dll's were not strongly named.

Unable to load those dll's into strongly named execution binary.

Unhandled Exception: System.IO.FileLoadException: Could not load file or assembly 'VMware.Vim, Version=6.5.1.378, Culture=neutral, PublicKeyToken=null' or one o

f its dependencies. A strongly-named assembly is required. (Exception from HRESULT: 0x80131044)

   at VimClientTest.Program.Main(String[] args)

Tags (2)
0 Kudos
1 Reply
Contributor
Contributor

Hi,

Starting with PowerCLI 6.5.0 we have removed strong naming for all PowerCLI assemblies, including VMware.Vim.

This was a required change on our side and was part of moving PowerCLI to PowerShell Gallery and enabling asynchronous releases of individual PowerCLI modules.

Strong naming is only responsible for assembly versioning and has no effect on security. For security purposes, all PowerCLI assemblies are digitally signed.

In your case, recompiling your code to reference the new Vim assembly should be enough.

Going forward, compiling your code against newer Vim assembly won't be required, as the newer version will be automatically picked up at runtime.

Please note that VMware.Vim is not an SDK and consuming it directly is not guaranteed to be backward compatible.

Backward compatibility is provided at the PowerShell interface level - PowerCLI cmdlets and PowerCLI Views.