Nuget package not compatible with framework

霸气de小男生 提交于 2019-12-12 22:43:25

问题


I created my own nuget package with the following content:

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.

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

What am I doing wrong?

Tim


回答1:


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

Here's more information, update-package



来源:https://stackoverflow.com/questions/38869711/nuget-package-not-compatible-with-framework

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!