microsoft / microsoft/powerbi-powershell

Importing Az.Accounts after MicrosoftPowerPIMgmt throws Assembly with same name is already loaded error

Open
#352 5 comments 3 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C#
Stars
413
Forks
134
Avg merge
33m
Merged PRs (30d)
1

Description

If you import MicrosoftPowerBIMgmt then import Az.Accounts an error will be thrown saying Import-Module: Assembly with same name is already loaded.

MicrosoftPowerBIMgmt version: 1.2.1077
Az.Accounts version: 2.7.2

Reproduction Steps:

Import-Module MicrosoftPowerBIMgmt
Import-Module Az.Accounts

It works fine when doing, however, I haven't tested all the features so something may be broken.

Import-Module Az.Accounts
Import-Module MicrosoftPowerBIMgmt

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by running the two Import-Module commands from the reproduction steps, then compare the module-loading entry points for MicrosoftPowerBIMgmt and Az.Accounts. Done means importing MicrosoftPowerBIMgmt followed by Az.Accounts no longer raises the assembly-name conflict, without breaking the reverse import order.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp, powershell
Domain
cli, tooling
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.