Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

error: NU1100: Unable to resolve 'MicrosoftOfficeCore (>= 15.0.0)' for 'net5.0'

In Terminal of Visual Studio Code, when I try to run:

dotnet add package MicrosoftOfficeCore --version 15.0.0

I get the following error on Visual Studio Code terminal

error: NU1100: Unable to resolve 'MicrosoftOfficeCore (>= 15.0.0)' for 'net5.0'
error: Package 'MicrosoftOfficeCore' is incompatible with 'all' frameworks in project

Do you have an idea ?

Thanks a lot in advance.

like image 811
Ghislain Bruyere Avatar asked Jul 07 '21 09:07

Ghislain Bruyere


1 Answers

  1. Try clearing the NuGet cache using dotnet nuget locals all --clear, and then try to add your package.

  2. If that doesn't work, try deleting the NuGet.config file present inside C:\Users\<username>\AppData\Roaming\NuGet directory, and then restore it using dotnet restore command. Try adding your package after this.

like image 136
Yash Gupta Avatar answered Oct 18 '22 02:10

Yash Gupta