Projects Targeting 3.5 Framework compiling in 2.0

kyo3eb used Ask the Experts™
I have all of my projects target framework to 3.5 and while some are compiling with the 3.5 csc.exe the STARTUP project is compiling in the 2.0 csc.exe thus giving me LINQ errors.

I've been googling like crazy and have found nothing, I would like to know how to get all of my projects to compile in 3.5.

I am running it on Windows 7, using VSTS 2008 SP1 and it's a Windows Application, let me know if there is more info you need as I can't think of anything else that could be affecting this.
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
The runtime version in the project, is indeed different than the tool (compiler) version used to build it.

I believe your issue will be found in the individual project file. Compare a "good one" to the bad one. Specifically, look at the header:
<Project ToolsVersion="3.5" DefaultTargets="Build" xmlns="">

Open in new window


Wow, I can't believe it was that. It seems to me like a bug in Visual Studio, considering that I am specifying in the project properties what framework I am intending to compile.

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial