codymanix
codymanix

Reputation: 29540

Targeting .NET 2.0 and using features of C# 3.x compiler

Is it possible to force Visual Studio 2008 to recognize C# 3 LINQ syntax, but not referencing the .NET 3.x dlls? We would use LINQBRIDGE to enable LINQ.

My problem is that it happened that I accidently was using a .NET 3.0 class, and thus got a TypeLoadException on the target machine.

Upvotes: 0

Views: 66

Answers (1)

SLaks
SLaks

Reputation: 888293

Set the Target Framework to .Net 2.0 in Project Properties.

It will still use the C# 3 compiler, but it won't let you reference .Net 3.0 assemblies.

Upvotes: 2

Related Questions