views:

1282

answers:

5

With normal .net applications in the properties window you can change the .net framework of your application from 3.5 to 2.0.

I'm looking for something like that for a pocket pc application, because I get an error on my pocket pc that my app requires a newer version of .net. and I can't find it anywhere in the properties.

A: 

In Visual Studio 2008 right click on your project and choose "Properties". On the "Application" tab is a drop down list for "Target Framework" that allows you to switch between v2.0, 3.0, or 3.5

GeekyMonkey
Compact framework applications have this drop down list grayed out and I clearly wanted to find out about compact framework applications (for pocket pc).
agnieszka
+2  A: 

First - you might want to check the "Devices" tab (VS2008), and check the "Deploy the latest version..." box (to push 3.5 onto the device, if this is an option).

It is entirely possible that you need to re-create the project file to do change the target to 2.0 (i.e. create a new project, selecting 2.0 on the first screen). It usually isn't a big job to copy in the .cs files etc...

If the project is large, you might consider editing the csproj manually, but I'm not sure I'd bother... probably less work to just re-add the code.

Marc Gravell
+2  A: 

Unfortunately it's not in the properties. For some (really stupid) reason you can upgrade a 2.0 project to 3.5 with a right click of the mouse, but there's no going back in the IDE. FOrtunately it's really easy still. Open the project in any text editor (including Studio if you have the accelerators installed) and change the Target Framework node back to 2.0.

ctacke
+1  A: 

Another solution could be to install the newer version of .NET CF on your device: http://www.google.com/search?q=compact+framework+redistributable

Regards, tamberg

tamberg
yeah, finally i just did that to save the time :D
agnieszka
A: 

If you create a CF 2.0 project in Visual Studio 2008 and then if you need to upgrade to CF 3.5, just right click on the project and choose "Upgrade Project". For the device side, be sure to check that checkbox Marc Gravell mentions so CF 3.5 gets installed when you deploy your project.

xarux