Closed jovieir closed 5 years ago
I've noticed that for Az.Accounts 1.4.0 and below (https://www.powershellgallery.com/packages/Az.Accounts/1.4.0), the ServiceModel assemblies are present but not after that version:
I've managed to find a workaround for now, though. High-level steps below:
1 - Install Az.Accounts version 1.4.0 in order to get the correct assemblies: 2 - Load the assemblies manually:
`[System.Reflection.Assembly]::LoadFrom('C:\Program Files\WindowsPowerShell\Modules\Az.Accounts\1.4.0\PreloadAssemblies\System.Private.ServiceModel.dll')
[System.Reflection.Assembly]::LoadFrom('C:\Program Files\WindowsPowerShell\Modules\Az.Accounts\1.4.0\PreloadAssemblies\System.ServiceModel.Primitives.dll')`
Thanks,
@jovieir It looks like you have multiple versions of both assemblies, and some Azure assemblies installed. This could be interfering with dll loading.
Could you:
Also, if you can repro, can you include the loaded assemblies before and after the issue?
PS C:\Users\markcowl> [System.AppDomain]::CurrentDomain.GetAssemblies() | Select -Property FullName, Location | Sort-Obj
ect -Property FullName
@jovieir Never mind, got a local repro. We'll push out a fix early next week.
@jovieir Looks like this fix will go out with the next major release, instead.
Fix is checkled in, should be available 6/18
Description
Hi folks, the Add-AzVhd command is apparently broken (tested with multiple Az.Compute and Az.Accounts versions). It seems it's missing assemblies:
Add-AzVhd : Could not load file or assembly 'System.ServiceModel.Primitives, Version=4.2.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified.
Steps to reproduce
Environment data
Module versions
Debug output
Error output