.NET 4.0 中的 System.Linq 在哪里?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/2893601/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Where is System.Linq in .NET 4.0?
提问by Tony_Henrich
I migrated an asp.net app to 4.0. Now I am getting an error "The type or namespace name 'IQueryable' could not be found". The reference to System.Linq is invalid and I can't find it in the reference list. Where did System.Linq go?
我将一个 asp.net 应用程序迁移到 4.0。现在我收到一个错误“找不到类型或命名空间名称‘IQueryable’”。对 System.Linq 的引用无效,我在引用列表中找不到它。System.Linq 去哪儿了?
回答by Andrew Hare
Make sure you are referencing System.Core.dllin your project. The IQueryable<T>type is defined in that assembly (just as it was in .NET 3.5).
确保您System.Core.dll在项目中引用。该IQueryable<T>类型在该程序集中定义(就像在 .NET 3.5 中一样)。
回答by matt
Make sure you have a reference to System.Core.dll in your project - I believe System.Linq resides there.
确保您在项目中引用了 System.Core.dll - 我相信 System.Linq 驻留在那里。
回答by Julien Lebosquain
It's in the System.Core.dll assembly.
它位于 System.Core.dll 程序集中。

