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 package to be installed but I keep getting the following errors when I try install any package.
Unable to resolve <package_name> for '.NETCoreApp,Version=v2.2'
Package <package_name> is incompatible with 'all' frameworks in project <csproj_path>
I use the following command to install the package:
dotnet add package AutoMapper.Extensions.Microsoft.DependencyInjection
What I've tried so far:
- Added PackageReference manually into the .csproj file then using dotnet restore - results in the same error (NU1100)
- Cleared the NuGet package cache using dotnet nuget locals all --clear - results in the same error
It was working before when I tried to install the Microsoft.EntityFrameworkCore.Sqlite package at the beginning of the course and now for some reason I can't install any package.
Do note that I'm not able to use the NuGet extension as it's not working behind a corporate proxy.
Any help would be greatly appreciated :)
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…