.NET 4.0中的System.Linq在哪里?

时间:2022-12-30 20:54:02

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在哪里?

3 个解决方案

#1


24  

Make sure you are referencing System.Core.dll in your project. The IQueryable<T> type is defined in that assembly (just as it was in .NET 3.5).

确保在项目中引用System.Core.dll。 IQueryable 类型在该程序集中定义(就像在.NET 3.5中一样)。

#2


3  

Make sure you have a reference to System.Core.dll in your project - I believe System.Linq resides there.

确保你的项目中有对System.Core.dll的引用 - 我相信System.Linq就在那里。

#3


1  

It's in the System.Core.dll assembly.

它位于System.Core.dll程序集中。

#1


24  

Make sure you are referencing System.Core.dll in your project. The IQueryable<T> type is defined in that assembly (just as it was in .NET 3.5).

确保在项目中引用System.Core.dll。 IQueryable 类型在该程序集中定义(就像在.NET 3.5中一样)。

#2


3  

Make sure you have a reference to System.Core.dll in your project - I believe System.Linq resides there.

确保你的项目中有对System.Core.dll的引用 - 我相信System.Linq就在那里。

#3


1  

It's in the System.Core.dll assembly.

它位于System.Core.dll程序集中。