Windows Vista Forums
Vista Forums Home Join Vista Forums Windows 7 Forum Vista Tutorials Tags
Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks.

Go Back   Vista Forums > Misc Newsgroups > .NET General

Vista Tutorial - C# express in VS2008 SP1 won't let you target 2.0

Reply
 
Old 01-08-2009   #1 (permalink)
Aficionado


Join Date: Jan 2008
Vista Home Premium 64 bit SP1
 
 

C# express in VS2008 SP1 won't let you target 2.0

afaict the only templates when selecting new project are for .NET 3.5.
So I select a Windows Form Application. Open project properties, change
it to target .NET 2.0. Tells me I have to save it first before I can change
it. Fine, save project. Go into properties, change it to target .NET 2.0.

I get 4 warnings about linq not being in system, when I build I get 2 errors.
Life would be a lot easier if you could just select .NET 2.0 Windows Form Application in the first place.

I've googled and I don't see how to get rid of the errors.
Can someone help out?

btw if you have a dropdown that lets you choose the target in the template
page then you probably aren't running the Express edition!

This is really annoying because I'm trying to crank out a small demo and not
everybody has .NET 3.5.

(btw I tried just down versioning to .NET 3.0 -- same complaints about linq.. no compile)

My System SpecsSystem Spec
Old 01-08-2009   #2 (permalink)
Aficionado


Join Date: Jan 2008
Vista Home Premium 64 bit SP1
 
 

Re: C# express in VS2008 SP1 won't let you target 2.0

Quote  Quote: Originally Posted by MilesAhead View Post
afaict the only templates when selecting new project are for .NET 3.5.
So I select a Windows Form Application. Open project properties, change
it to target .NET 2.0. Tells me I have to save it first before I can change
it. Fine, save project. Go into properties, change it to target .NET 2.0.

I get 4 warnings about linq not being in system, when I build I get 2 errors.
Life would be a lot easier if you could just select .NET 2.0 Windows Form Application in the first place.

I've googled and I don't see how to get rid of the errors.
Can someone help out?

btw if you have a dropdown that lets you choose the target in the template
page then you probably aren't running the Express edition!

This is really annoying because I'm trying to crank out a small demo and not
everybody has .NET 3.5.

(btw I tried just down versioning to .NET 3.0 -- same complaints about linq.. no compile)
Well, so far all I've found is the Empty Project will let you downgrade to target .NET 2.0. Only thing is then I have to add a form, then add a code file, then paste in some generic Program.cs code to run Form1. Man this is really lame!!
My System SpecsSystem Spec
Old 01-09-2009   #3 (permalink)
Aficionado


Join Date: Jan 2008
Vista Home Premium 64 bit SP1
 
 

Re: C# express in VS2008 SP1 won't let you target 2.0

Quote:
... trying to do .NET 2.0 Windows Form Application in C# Express VS2008...

Well, so far all I've found is the Empty Project will let you downgrade to target .NET 2.0. Only thing is then I have to add a form, then add a code file, then paste in some generic Program.cs code to run Form1. Man this is really lame!!
In case anyone else runs into this, just create your default Windows Form Application, and save before doing any customization. Open Project Properties and change the drop down list to target 2.0 or 3.0. Then in the Solution Explorer references delete the linq references and the data extension references(at least for .NET 2.0 target). Now in Form1.cs and Program.cs delete the using statements that refer to linq or data. Save and it should stop giving warnings and errors. To confirm just build as a form that closes when you click the 'x' on the window frame. If that compiles you should be good to go. Once you know exactly what to change it only takes a minute.
My System SpecsSystem Spec
Reply

Thread Tools


Similar Threads
Thread Forum
Upgrading from VS2008 standard to VS2008 Pro? .NET General
upgrade from VS2008 standard to VS2008 pro- options? .NET General
vs2008 express help problem .NET General
Target Photo CD Vista music pictures video
target error Vista General


Vista Forums is an independent web site and has not been authorized,
sponsored, or otherwise approved by Microsoft Corporation.
"Windows Vista", the Start Orb, and related materials are trademarks of Microsoft Corp.
© Designer Media Ltd

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46