Closed janegilring closed 1 year ago
Is this happening when you install system wide and then attempt to install in the current session? Does it give you an error if you uninstall system wide (option 3) and try local install again?
Also, we just released a new version of the cmdlets that you can give a try as well. The incremented version will hopefully solve this, but if it doesn't (or you want guidance on removing an old version that is not being removed correctly with script) I can help with that.
@janegilring friendly ping on this issue. Are you still running into this?
Sorry for the late response on this issue.
It works fine using AzDeploymentStacksPrivatePreview_Powershell_9.1.9.
Option 1:
Select the operation you'd like to perform:
1. Install module in current Powershell session
2. Install module system-wide
3. Uninstall module (previous system-wide installs)
Note: When you install the preview module, the preview functionality
will override the official/public Az.Resources module functionality until
the Powershell session is closed (if option 1 is selected) or until the
preview module is uninstalled through this script (if installed through
option 2).
Which operation (1, 2, or 3)?: 1
This action will install the Deployment Stack cmdlet(s) to the current
Powershell Session (prompt) so they can be previewed/tested.
Continue with install? (Y/N): y
Verifying Azure Powershell module availability...
Azure Powershell module verified!
Verifying you're logged into Azure...
Login verified!
Installing demo module 'Az.Resources'... (current session only)
Module installed!
Option 2:
Select the operation you'd like to perform:
1. Install module in current Powershell session
2. Install module system-wide
3. Uninstall module (previous system-wide installs)
Note: When you install the preview module, the preview functionality
will override the official/public Az.Resources module functionality until
the Powershell session is closed (if option 1 is selected) or until the
preview module is uninstalled through this script (if installed through
option 2).
Which operation (1, 2, or 3)?: 2
This action will install the Deployment Stack cmdlet(s) to your system
so they can be previewed/tested. To return to the non-preview cmdlets
afterwards, you'll need to run this script again and select the uninstall
option.
Continue with install? (Y/N): y
Verifying Azure Powershell module availability...
Azure Powershell module verified!
Verifying you're logged into Azure...
Login verified!
Installing demo module 'Az.Resources'... (system-wide installation)
Module installed!
Describe the bug The error "Assembly with same name is already loaded" is returned during PowerShell module installation, when selecting option 1 ("Install in current Powershell session").
To Reproduce Steps to reproduce the behavior:
Expected behavior The operation should succeed when choosing option 1.
When choosing option 2, it works:
Repro Environment
This environment is running inside GitHub Codespaces.
The latest version of the Az-module is also installed.
Update
The issue is also re-produced in a local VS Code dev container running the following versions: