Giter Site home page Giter Site logo

Cannot install. Install-Package: Dependency loop detected for package 'Microsoft.IdentityModel.Clients.ActiveDirectory' about azure-activedirectory-library-for-dotnet HOT 10 CLOSED

konrad-jamrozik avatar konrad-jamrozik commented on June 21, 2024
Cannot install. Install-Package: Dependency loop detected for package 'Microsoft.IdentityModel.Clients.ActiveDirectory'

from azure-activedirectory-library-for-dotnet.

Comments (10)

jmprieur avatar jmprieur commented on June 21, 2024 1

@konrad-jamrozik, I suggest you ask the question in the MSAL.ps repo (I'm not familiar with the usage of MSAL in PowerShell, but I know this works very well)

from azure-activedirectory-library-for-dotnet.

jmprieur avatar jmprieur commented on June 21, 2024

@konrad-jamrozik
ADAL.Net does not depend on anything else than the .NET framework

image

Also this is concerning that nuget would be not trusted?
I think you might have some issues with your nuget.config files ?

from azure-activedirectory-library-for-dotnet.

konrad-jamrozik avatar konrad-jamrozik commented on June 21, 2024

@jmprieur my nuget.config below. Note I passed the -Source https://api.nuget.org/v3/index.json parameter. I would expect that the content of my nuget.config should not matter given this argument.

It took NuGet several minutes before it output that error.

In any case, if it should work, later I can do some investigation with verbose logging etc. to figure out the root cause and report it back here. For now I have a workaround by directly attaching .dll from the package with Add-Type to the script I am trying to run.


My nuget.config:

<?xml version="1.0" encoding="utf-8"?>
<configuration>
  <activePackageSource>
    <add key="All" value="(Aggregate source)" />
  </activePackageSource>
  <packageSources>
    <clear />
    
    <add key="INTERNAL_NAME" value="INTERNAL_VALUE" />
    <add key="nuget.org" value="https://api.nuget.org/v3/index.json" protocolVersion="3" />
  </packageSources>
  <packageSourceCredentials>
    <INTERNAL_NAME>
      <add key="Username" value="PAT" />
      <add key="ClearTextPassword" value="PAT_VALUE" />
    </INTERNAL_NAME>
  </packageSourceCredentials>
</configuration>

from azure-activedirectory-library-for-dotnet.

jmprieur avatar jmprieur commented on June 21, 2024

@konrad-jamrozik you might want to clear you Nuget cache?
under C:\users\yourAlias.nuget\packages remove the folder for ADAL for instance.

It's safe to remove all the folders if you don't mind re downloading them, btw

from azure-activedirectory-library-for-dotnet.

konrad-jamrozik avatar konrad-jamrozik commented on June 21, 2024

@jmprieur that was the first thing I did. Observe the first line in my first post:

~\.nuget> Remove-item -Force -Recurse packages

from azure-activedirectory-library-for-dotnet.

jmprieur avatar jmprieur commented on June 21, 2024

@konrad-jamrozik is your project using the PackageReference? or still the old package.config?

from azure-activedirectory-library-for-dotnet.

konrad-jamrozik avatar konrad-jamrozik commented on June 21, 2024

@jmprieur pardon my ignorance, but to my understanding there is no project to speak of. I am trying to run a powershell .ps1 file that fails on following line:

$platformParameters = New-Object "Microsoft.IdentityModel.Clients.ActiveDirectory.PlatformParameters" -ArgumentList "Auto"

with error:

Cannot find type [Microsoft.IdentityModel.Clients.ActiveDirectory.PlatformParameters]: verify that the assembly containing this type is loaded.

hence I concluded I probably need to install the package.

from azure-activedirectory-library-for-dotnet.

jmprieur avatar jmprieur commented on June 21, 2024

@konrad-jamrozik : if you're using it from PowerShell, then please rather use https://github.com/AzureAD/MSAL.PS/, which is maintained and tested, and using MSAL.NET (ADAL.NET is deprecated)

from azure-activedirectory-library-for-dotnet.

konrad-jamrozik avatar konrad-jamrozik commented on June 21, 2024

@jmprieur OK thx. I installed the module:

Install-Module MSAL.PS -Repository PSGallery

but the script fails the same way. I understand the answer then is "this problem won't be fixed as the script I am using is unsupported", correct?

from azure-activedirectory-library-for-dotnet.

konrad-jamrozik avatar konrad-jamrozik commented on June 21, 2024

OK, thanks @jmprieur. Closing this as a hybrid between "answered", "redirected" and "won't fix" ;)

from azure-activedirectory-library-for-dotnet.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.