Azure / azure-powershell-migration

Tools and resources to help migrate PowerShell scripts between incompatible versions of Az and AzureRM modules
MIT License
35 stars 18 forks source link

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

Open rajasmr opened 8 months ago

rajasmr commented 8 months ago

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

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 commented 8 months ago

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.