NuGet Error NU1101

Mike 251 Reputation points
2023-08-08T19:00:57.16+00:00

I am not a developer but I am hoping to test an application provided by Microsoft.

https://learn.microsoft.com/en-us/azure/active-directory-b2c/configure-authentication-sample-web-app?tabs=visual-studio

I have downloaded what is needed. After the modification of the JSON file and build it, visual studio returns an error I have not idea how to fix. These are the 2 errors.

Severity Code Description Project File Line Suppression State

Error NU1101 Unable to find package Microsoft.Identity.Web.UI. No packages exist with this id in source(s): Microsoft Visual Studio Offline Packages WebApp-OpenIDConnect-DotNet G:\Others\active-directory-aspnetcore-webapp-openidconnect-v2-master\active-directory-aspnetcore-webapp-openidconnect-v2-master\1-WebApp-OIDC\1-5-B2C\WebApp-OpenIDConnect-DotNet.csproj 1

Severity Code Description Project File Line Suppression State

Error NU1101 Unable to find package Microsoft.Identity.Web. No packages exist with this id in source(s): Microsoft Visual Studio Offline Packages WebApp-OpenIDConnect-DotNet G:\Others\active-directory-aspnetcore-webapp-openidconnect-v2-master\active-directory-aspnetcore-webapp-openidconnect-v2-master\1-WebApp-OIDC\1-5-B2C\WebApp-OpenIDConnect-DotNet.csproj 1

User's image

Microsoft Security | Microsoft Entra | Microsoft Entra ID
Developer technologies | Visual Studio | Other
Developer technologies | Visual Studio | Other
A family of Microsoft suites of integrated development tools for building applications for Windows, the web, mobile devices and many other platforms. Miscellaneous topics that do not fit into specific categories.
0 comments No comments
{count} votes

Answer accepted by question author
  1. Tianyu Sun-MSFT 34,686 Reputation points Microsoft External Staff
    2023-08-09T08:37:25.89+00:00

    Hello @Mike,

    Welcome to Microsoft Q&A forum.

    Probably, you need to add another valid package source for VS to find the specific packages.

    Please click Tools > NuGet Package Manager > Package Manager Settings > Package Sources > check if nuget.org package source has been added. If it hasn’t been added, please click the “Add” button on top right corner > change the Name to nuget.org and the Source to https://api.nuget.org/v3/index.json > click Update > click OK, then rebuild your project.

    User's image

    If it has been added, please try to remove other invalid package sources. If this issue persists, please share us the screenshot about the package sources for further check.

    Sincerely,

    Tianyu


    If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    2 people found this answer helpful.

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.