【问题标题】:Nuget package not compatible with frameworkNuget 包与框架不兼容
【发布时间】:2016-08-10 23:19:16
【问题描述】:

我创建了自己的 nuget 包,内容如下:

我有一个默认的 nuspec:

<?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>

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

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

我做错了什么?

提姆

【问题讨论】:

  • 我也在寻找这个问题的答案。

标签: package nuget .net-framework-version


【解决方案1】:

你可以试试这个,去查看 -> 其他窗口 -> 包管理器控制台,

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

update-package -reinstall

这里有更多信息, update-package

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2016-01-07
    • 2019-08-04
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多