错误:NU1100:无法解析“net5.0"的“MicrosoftOfficeCore (>= 15.0.0)" [英] error: NU1100: Unable to resolve 'MicrosoftOfficeCore (>= 15.0.0)' for 'net5.0'

查看:123
本文介绍了错误:NU1100:无法解析“net5.0"的“MicrosoftOfficeCore (>= 15.0.0)"的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在 Visual Studio Code 的终端中,当我尝试运行时:

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

dotnet add package MicrosoftOfficeCore --version 15.0.0

我在 Visual Studio Code 终端上收到以下错误

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

你有什么想法吗?

非常感谢.

推荐答案

  1. 尝试使用 dotnet nuget locals all --clear 清除 NuGet 缓存,然后尝试添加您的包.

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

如果这不起作用,请尝试删除 C:\Users\\AppData\Roaming\NuGetNuGet.config 文件> 目录,然后使用 dotnet restore 命令恢复它.在此之后尝试添加您的包.

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.

这篇关于错误:NU1100:无法解析“net5.0"的“MicrosoftOfficeCore (>= 15.0.0)"的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆