Unable to install packages using dotnet add package

前端 未结 1 1401
没有蜡笔的小新
没有蜡笔的小新 2020-12-21 06:34

I\'m a .NET newbie using VS Code while following an online course on Angular and .NET Core. The course requires the AutoMapper.Extensions.Microsoft.DependencyInjection

1条回答
  •  温柔的废话
    2020-12-21 07:07

    I finally fixed the issue by deleting the NuGet.Config file in C:\Users\\AppData\Roaming\NuGet folder then running dotnet restore

    Running dotnet restore created a fresh config file on the folder which i noticed has a different packageSources value than the old one.

    The old one had https://www.nuget.org/api/v2/ while the new one had https://api.nuget.org/v3/index.json

    I completely forgot that I have VS 2010 (with nuget) installed which was responsible for the old config file and I did not realize that nuget from the dotnet-cli was also using the same old configurations.

    0 讨论(0)
提交回复
热议问题