Nuget软件包与框架不兼容 [英] Nuget package not compatible with framework

查看:1382
本文介绍了Nuget软件包与框架不兼容的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我创建了具有以下内容的自己的nuget包:

I created my own nuget package with the following content:

我有一个默认的nuspec:

I had a default nuspec for it:

<?xml version="1.0"?>
<package >
  <metadata>
    <id>Communited.PluginService.Base</id>
    <version>5.4.3.4</version>
    <authors>Communited</authors>
    <owners>Communited</owners>
    <requireLicenseAcceptance>false</requireLicenseAcceptance>
    <description>The Communited PluginService Base application. Needed to run custom plugins</description>
    <copyright>Copyright 2016</copyright>
  </metadata>
</package>

在我的项目中安装它时,出现以下错误:

When installing this in my project I get the following error:

Install-Package : Could not install package 'Communited.PluginService.Base 5.4.3.4'. You are trying to install this package into a project that targets 
'.NETFramework,Version=v4.5', but the package does not contain any assembly references or content files that are compatible with that framework. For 
more information, contact the package author.

我要安装它的项目是.NET Framework 4.5

The project that i'm installing it on, is .NET Framework 4.5

我在做什么错了?

蒂姆

推荐答案

可以尝试一下吗,请转到视图"->其他Windows"->程序包管理器控制台"

Can you try this, Go to View -> Other Windows -> Package Manager Console,

运行以下命令,(前提是该软件包可用于目标框架)

run below command,(provided the package is available for the target framework)

update-package -reinstall

更多信息, 更新包

这篇关于Nuget软件包与框架不兼容的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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