我创建了这个包,需要在项目中使用,但是安装时出现了以下错误:
无法安装' Mshwf.NiceLinq 1.0.9'。您正在尝试将此程序包安装到以 '.NETFramework,Version=v4.5' 为目标的项目中,但该程序包不包含任何与该框架兼容的程序集引用或内容文件。有关详细信息,请联系程序包作者。
我不知道为什么会发生这种情况,在另一个项目(Console)中,我将框架更改为4.6和其他版本,并没有出现问题,但是在这个项目(MVC和Web API)中却发生了问题:
这是nuspec文件:
<?xml version="1.0"?>
<package >
<metadata>
<id>Mshwf.NiceLinq</id>
<version>1.0.9</version>
<title>Nice LINQ</title>
<authors>MShawaf</authors>
<owners>Mshawaf</owners>
<projectUrl>https://github.com/mshwf/NiceLinq</projectUrl>
<iconUrl>https://raw.githubusercontent.com/mshwf/NiceLinq/master/logo.png</iconUrl>
<requireLicenseAcceptance>false</requireLicenseAcceptance>
<description>See it as: WHERE ID IN (1, 2, 3, 7, 9, 22, 30, 101)</description>
<releaseNotes>Minor changes.</releaseNotes>
<copyright>Copyright 2016</copyright>
<tags>LINQ IEnumerable Where Contains Search Filter</tags>
</metadata>
</package>