问题
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