Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Working of Azure RM and AZ modules till test the commands on the lower environment #140

Open
rajasmr opened this issue Feb 29, 2024 · 1 comment

Comments

@rajasmr
Copy link

rajasmr commented Feb 29, 2024

Component
[] PowerShell module : 5.1
[] VSCode extension
[] Other

Description of the issue
We are trying migrate Azure RM modules to AZ modules. we expect the both commands to run but we see post installing AZ and Azure RM we got a error.

Error:

PS C:\Users\XXXXXX> Connect-AzureRmAccount
Connect-AzureRmAccount : Method 'get_SerializationSettings' in type
'Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient' from assembly
'Microsoft.Azure.Commands.ResourceManager.Common, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' does not have an
implementation.
At line:1 char:1

  • Connect-AzureRmAccount
  •   + CategoryInfo          : NotSpecified: (:) [Connect-AzureRmAccount], TypeLoadException
      + FullyQualifiedErrorId : System.TypeLoadException,Microsoft.Azure.Commands.Profile.ConnectAzureRmAccountCommand
    
    

Describe how to reproduce the issue
post install az module.
Install-Module -Name PowerShellGet -Force

Environment
DEV

Error output
Share the error log

Additional context
Add any other context or screenshots about the issue here.

@isra-fel
Copy link
Member

isra-fel commented Mar 4, 2024

Hi @rajasmr Az and AzureRM were not designed to work together. The main reason is that they depend on different versions of the same assemblies that cannot be imported to the same PowerShell session because they will conflict with each other.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants