You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In psd1 have the following lines.
NestedModules = @('.\netstandard1.6\Microsoft.Azure.Commands.Profile.dll')
FormatsToProcess = '.\netstandard1.6\Microsoft.Azure.Commands.Profile.format.ps1xml'
Expected behavior
Both files could be found and loaded throug import-module
Actual behavior
ps1xml has no issues while Microsoft.Azure.Commands.Profile.dll file fails with obscure error message:
PS /usr/local/src> Import-Module AzureRM.Profile.Netcore -Verbose -Debug
VERBOSE: Loading module from path
'/opt/microsoft/powershell/6.0.0-alpha.18/Modules/AzureRM.Profile.Netcore/1.0.0/AzureRM.Profile.Netcore.psd1'.
VERBOSE: Loading 'FormatsToProcess' from path
'/opt/microsoft/powershell/6.0.0-alpha.18/Modules/AzureRM.Profile.Netcore/1.0.0/netstandard1.6/Microsoft.Azure.Commands.Profile
.format.ps1xml'.
VERBOSE: Populating RepositorySourceLocation property for module AzureRM.Profile.Netcore.
Import-Module : The given assembly name or codebase was invalid. (Exception from HRESULT: 0x80131047)
At line:1 char:1
Remove '.' at the beginning of each NestedModule and everything works fine on Windows, Linux and Mac OS.
It is inconsistent and the worst thing is the error message.
Steps to reproduce
In psd1 have the following lines.
NestedModules = @('.\netstandard1.6\Microsoft.Azure.Commands.Profile.dll')
FormatsToProcess = '.\netstandard1.6\Microsoft.Azure.Commands.Profile.format.ps1xml'
Expected behavior
Both files could be found and loaded throug import-module
Actual behavior
ps1xml has no issues while Microsoft.Azure.Commands.Profile.dll file fails with obscure error message:
PS /usr/local/src> Import-Module AzureRM.Profile.Netcore -Verbose -Debug
VERBOSE: Loading module from path
'/opt/microsoft/powershell/6.0.0-alpha.18/Modules/AzureRM.Profile.Netcore/1.0.0/AzureRM.Profile.Netcore.psd1'.
VERBOSE: Loading 'FormatsToProcess' from path
'/opt/microsoft/powershell/6.0.0-alpha.18/Modules/AzureRM.Profile.Netcore/1.0.0/netstandard1.6/Microsoft.Azure.Commands.Profile
.format.ps1xml'.
VERBOSE: Populating RepositorySourceLocation property for module AzureRM.Profile.Netcore.
Import-Module : The given assembly name or codebase was invalid. (Exception from HRESULT: 0x80131047)
At line:1 char:1
Environment data
Red Hat Enterprise Linux 7
Current Workaround
Remove '.' at the beginning of each NestedModule and everything works fine on Windows, Linux and Mac OS.
It is inconsistent and the worst thing is the error message.