在 .Net Standard 1.5 项目中(从 nuget 安装了 1.6),我无法使用 System.Linq.Enumerable 中的 Linq 扩展方法,例如 LIST 上的 Where 和 Select 方法。我已经安装了以下包:
"System.Linq": "4.3.0",
"System.Linq.Expressions": "4.3.0",
"System.Linq.Queryable": "4.3.0",
更新
示例:
using System.Linq;
List<string> myList = new List();
myList = // suppose list got data
myList.Where( // Where is not available
注意
System.Linq.Enumerable静态类包含的扩展方法不可访问。
更新2
{
"supports": {},
"dependencies": {
"Chance.MvvmCross.Plugins.UserInteraction": "1.1.4",
"Fody": "1.29.4",
"MethodDecorator.Fody": "0.9.0.6",
"Microsoft.NETCore.Portable.Compatibility": "1.0.1",
"MvvmCross": "4.3.0",
"MvvmCross.Platform": "4.3.0",
"NEST": "5.0.0",
"NETStandard.Library": "1.6.1",
"Newtonsoft.Json": "9.0.1",
"PropertyChanged.Fody": "1.52.1",
"System.Linq": "4.3.0",
"System.Linq.Expressions": "4.3.0",
"System.Linq.Queryable": "4.3.0",
"System.ServiceModel": "1.0.0",
"System.ServiceModel.Http": "4.3.0",
"System.ServiceModel.Security": "4.3.0"
},
"frameworks": {
"netstandard1.5": {
"imports": "portable-net45+netcore45+wp8"
}
}
}
project.json
文件。 - haim770