An exception occurred while trying to reference the LINQ namespace

When trying to use LINQ in .NET 2.0 Windows Forms, I got:

The namespace or type specified in System.Linq for import does not contain any public element or cannot be found. Ensure that the namespace or type is defined and contains at least one public item. Make sure the name of the imported item is not using any aliases

In both lines that reference the following namespaces:

System.Linq;
System.Xml.Linq;

How can I get these namespaces to work on .NET 2.0 without a link to an external DLL or something else?

+3
source share
4 answers

. .NET 3.5.

LINQ to XML .NET 2.0 ( Mono - , Mono ). LINQBridge, LINQ to Objects .NET 2.0, , , " ".

+8

LINQ .NET Framework 2.0. 3.5.

+1

, LINQ .NET 2.0, 3.0 Mono LINQ. , , , DLL. , .NET DLL, .

: - LINQBridge, , .

+1

System.Core ( .NET 3.5).

0

Source: https://habr.com/ru/post/1738948/


All Articles