Encountering the error : Unable to resolve dependency 'Azure.SDK.ServiceRuntime'. Source(s) used: 'Microsoft Visual Studio Offline Packages', 'Nuget.Org'. while trying to install the nuget package : Azure.Security.KeyVault.Secrets

Rohita Rajasekharan (WIPRO LIMITED) 0 Reputation points Microsoft Vendor
2023-08-01T07:52:43.53+00:00

Since the package: Microsoft.Azure.KeyVault (ADAL.net package) has been deprecated, we have been trying to migrate to the mentioned new MSAL.NET Packages (Current): Azure.Security.KeyVault.Secrets, Azure.Security.KeyVault.Keys, Azure.Security.KeyVault.Certificates since our application is using the deprecated packages.

While trying to install the MSAL.net packages from nuget on the VS (2019/2022 version), we are encountering the issue : Unable to resolve dependency 'Azure.SDK.ServiceRuntime'. Source(s) used: 'Microsoft Visual Studio Offline Packages', 'Nuget.Org'.

Our solution is using the reference of the package : Microsoft.WindowsAzure.sdk which has the dll : Microsoft.WindowsAzure.ServiceRuntime.dll. We have tried to uninstall this package and then try installing the 3 MSAL.net packages but the error still persists.

Could anyone please help on this?

Azure Key Vault
Azure Key Vault
An Azure service that is used to manage and protect cryptographic keys and other secrets used by cloud apps and services.
1,194 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Shweta Mathur 29,756 Reputation points Microsoft Employee
    2023-08-02T07:14:47.9633333+00:00

    Hi @Rohita Rajasekharan (WIPRO LIMITED) ,

    Thanks for reaching out.

    The error message you are seeing indicates that there is a dependency issue with the 'Azure.SDK.ServiceRuntime' package.

    To resolve this issue, you can try the following steps:

    First, make sure that you have the latest version of NuGet installed in your Visual Studio. You can check for updates by going to Tools > Extensions and Updates > Updates.

    1. Try clearing the NuGet cache by going to Tools > Options > NuGet Package Manager > General and clicking on the Clear All NuGet Cache(s) button.

    User's image

    If the issue persists, you can try manually installing the 'Azure.SDK.ServiceRuntime' package by going to the Package Manager Console and running the following command:

    Install-Package Azure.SDK.ServiceRuntime -Version <version>
    

    Replace <version> with the version of the package that you want to install.

    Once you have installed the 'Azure.SDK.ServiceRuntime' package, try installing the MSAL.NET packages again.

    If none of the above step's work, you can try creating a new project and installing the MSAL.NET packages in the new project and compare the configurations.

    Hope this will help.

    Thanks,

    Shweta


    Please remember to "Accept Answer" if answer helped you.

    0 comments No comments