SDF Custom Control

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

So I have a project in VS .Net 2003 that uses a custom control that I created
and it all works great. I want to convert it all to VS .Net 2005. I opened
the Control project, it converted to 2005 with no problems and compiled
flawlessly. I did the same with my application project (the one that
consumes the control), it required that I change some references from
OpenNETCF V1.3 to the new V2.0 Beta.

It compiles with just one error:

Metadata file 'c:\Program Files\Microsoft Visual Studio8\
SmartDevices\SDK\CompactFramework\2.0\v2.0\WindowsCE\CompactControls.dll'
could not be opened -- 'Version 2.0 is not a compatible
version.' C:\Master.NET2005\MobileApps\PreprocEval\PreProcEval\CSC PreProcEval

I have also tried creating a new Control Project in .Net 2005 and pasting
the control code from the 2003 project into the 2005 project to no avail.
Does anyone have a clue as to what is going on here?

Bill
 
What is the target platform (PocketPC, Smartphone, WindowsCE) of the control
project and application project? What version of the CF are you targeting
with the control project and application project? All of these things need
to line up properly to create a custom control that works as you'd expect.
 
Tim, both the control and the application are targeting the PocketPC. It is
possible I could be confused on CF version. I'm using VS .NET 2005
Professional to compile both projects hence I had assumed it would be
targeting CF V2.0. However I do note that when I navigate the following
path, C:\Program Files\Microsoft Visual Studio
8\SmartDevices\SDK\CompactFramework\2.0, that I find 2 subfolders there
labeled "v1.0", and "v2.0". Are there different versions of CF within the
VS2005 environment? How would I know which to use, and how would I set VS to
use one or the other?

Bill
 
If you converted a project targeting the PocketPC platform from VS.NET 2003
to VS 2005 then you should still be targeting CF 1.0. VS 2005 will keep you
on the same CF version if it can and since you can target CF 1.0 or 2.0 with
PocketPC in VS 2005 it will keep you with 1.0. However, it should have done
the same thing for both projects. If you select a project in Solution
Explorer and then look in the Properties window you should be able to see
which CF version you're targeting. You can also right-click a CF 1.0 project
in Solution Explorer and choose to upgrade to CF 2.0 from a choice near the
bottom of the context menu that is displayed.
 
Back
Top