using System.Linq

In all new forms the

"using System.Linq"

is included automatically, however, it causes the error:

Error 1 The type or namespace name 'Linq' does not exist in the namespace 'System' (are you missing an assembly reference?) D:\C#\PPTestApp\PPTestApp\frmCmdC10.cs 6 14 PPTestApp

Commenting out the "using" line allows the build to continue, however, obviously something is missing.

[445 byte] By [sj_h1] at [2008-2-23]
# 1

You'll get this error if you don't have "System.Core.dll" referenced (the assembly which contains the core LINQ APIs). However, all of the default templates should include this reference when you target .NET3.5.

What steps did you take to create your project and then add the form? There may be a bug in the project templates that is the root cause for this problem.

Thanks,

Luke Hoban

Visual C# Compiler Program Manager

LukeHoban at 2007-9-25 > top of Msdn Tech,Visual Studio Orcas,Visual C# Orcas...
# 2
You have not changed the target framework to 3.0 or lower, have you? Because that will result in similar behavior.
Ogglord at 2007-9-25 > top of Msdn Tech,Visual Studio Orcas,Visual C# Orcas...
# 3
Quite frankly I don't even know how to do that. It should still be set to what ever the default is.
sj_h1 at 2007-9-25 > top of Msdn Tech,Visual Studio Orcas,Visual C# Orcas...

Visual Studio Orcas

Site Classified