A few questions:
- I can create a new Smart Dev Application when I first create a project
from the New Project wizard, but how do I add CE as a build target later,
after I've created a "Windows Application"? The configuration manager
doesn't seem to let me do this. (E.g., I have a application that I want to
work in multiple environments -- desktop, CE, etc., it will resize, or
otherwise change behavior on the CE device.)
- What about class libs -- will they work on both platforms? (There's no
"Smart dev classlib" option -- but I thought there were APIs and
functionality not avail on all targets -- do I have to wait 'till runtime
before I get an error?)

thanks,
mike

Re: Targeting .Net CF by Chris

Chris
Mon Nov 10 21:23:44 CST 2003

Currently Studio doesn't support what you're asking for. The best you can
do is create a Smart Device app and avoid non-SD calls (or code for them),
then test with a desktop project.

-Chris



"Mike" <vimakefile@yahoo.com> wrote in message
news:enIPb8$pDHA.3688@TK2MSFTNGP11.phx.gbl...
> A few questions:
> - I can create a new Smart Dev Application when I first create a project
> from the New Project wizard, but how do I add CE as a build target later,
> after I've created a "Windows Application"? The configuration manager
> doesn't seem to let me do this. (E.g., I have a application that I want
to
> work in multiple environments -- desktop, CE, etc., it will resize, or
> otherwise change behavior on the CE device.)
> - What about class libs -- will they work on both platforms? (There's no
> "Smart dev classlib" option -- but I thought there were APIs and
> functionality not avail on all targets -- do I have to wait 'till runtime
> before I get an error?)
>
> thanks,
> mike
>
>
>



Re: Targeting .Net CF by Mike

Mike
Tue Nov 11 12:57:59 CST 2003

Wow, not that it's your fault, but that's pretty lame.
I hope in the future CE, et. al., are just treated as other build targets
that happen to use different libs and can live in peace and harmony with
each other...
Okay, so what exactly are my options? Can you explain how
you want me to "test the SD app with a desktop project"?

I tried adding a reference to an existing 'desktop' code lib
to a sd-app, added the proper 'using' and pasted some code --
and everything compiled fine. At runtime, however, I get a
MissingMethodException.

I'm finding it hard to beleive that a simple code lib (let's say some
common data structures or constants or helper fn's) can't be used by both
a desktop and CE application, as long as it's "least common demoninator
code"
or for quesitonable code, dymamically binds through reflection or
dynamically loads assemblies.

Is there way way to have several VS projects reference the same souce files?
I can drag-drop the sources, but this physically copies them -- I looked for
a
right-click option to have an 'add link', but no such luck...
I guess I can write a script that propagates source file changes to other
dirs,
but geez, this is 2003...

In this case the code lib in question facilitates communication between
sd-apps and desktop/servers, and the GUI in question is a container that
is meant to hold panels that also can be displayed in either envoronment, so
you can see why I want to ues the same codebase for both.

thanks again,
mike


"Chris Tacke, eMVP" <ctacke@NOinnovativedssSPAM.com> wrote in message
news:u1qKzLAqDHA.1708@TK2MSFTNGP12.phx.gbl...
> Currently Studio doesn't support what you're asking for. The best you can
> do is create a Smart Device app and avoid non-SD calls (or code for them),
> then test with a desktop project.
>
> -Chris
>
>
>
> "Mike" <vimakefile@yahoo.com> wrote in message
> news:enIPb8$pDHA.3688@TK2MSFTNGP11.phx.gbl...
> > A few questions:
> > - I can create a new Smart Dev Application when I first create a project
> > from the New Project wizard, but how do I add CE as a build target
later,
> > after I've created a "Windows Application"? The configuration manager
> > doesn't seem to let me do this. (E.g., I have a application that I want
> to
> > work in multiple environments -- desktop, CE, etc., it will resize, or
> > otherwise change behavior on the CE device.)
> > - What about class libs -- will they work on both platforms? (There's no
> > "Smart dev classlib" option -- but I thought there were APIs and
> > functionality not avail on all targets -- do I have to wait 'till
runtime
> > before I get an error?)
> >
> > thanks,
> > mike
> >
> >
> >
>
>



Re: Targeting .Net CF by Chris

Chris
Tue Nov 11 13:21:22 CST 2003

Yeah, it's a pain.

If you create the binary as a smart-device binary, it can be retargetted to
the desktop (the reverse is not supported). So put all common code in a CF
project, and then create a desktop project that consumes that binary.

--
Chris Tacke, eMVP
Co-Founder and Advisory Board Member
www.OpenNETCF.org
---
Windows CE Product Manager
Applied Data Systems
www.applieddata.net


"Mike" <vimakefile@yahoo.com> wrote in message
news:u0J56WIqDHA.2848@TK2MSFTNGP10.phx.gbl...
> Wow, not that it's your fault, but that's pretty lame.
> I hope in the future CE, et. al., are just treated as other build targets
> that happen to use different libs and can live in peace and harmony with
> each other...
> Okay, so what exactly are my options? Can you explain how
> you want me to "test the SD app with a desktop project"?
>
> I tried adding a reference to an existing 'desktop' code lib
> to a sd-app, added the proper 'using' and pasted some code --
> and everything compiled fine. At runtime, however, I get a
> MissingMethodException.
>
> I'm finding it hard to beleive that a simple code lib (let's say some
> common data structures or constants or helper fn's) can't be used by both
> a desktop and CE application, as long as it's "least common demoninator
> code"
> or for quesitonable code, dymamically binds through reflection or
> dynamically loads assemblies.
>
> Is there way way to have several VS projects reference the same souce
files?
> I can drag-drop the sources, but this physically copies them -- I looked
for
> a
> right-click option to have an 'add link', but no such luck...
> I guess I can write a script that propagates source file changes to other
> dirs,
> but geez, this is 2003...
>
> In this case the code lib in question facilitates communication between
> sd-apps and desktop/servers, and the GUI in question is a container that
> is meant to hold panels that also can be displayed in either envoronment,
so
> you can see why I want to ues the same codebase for both.
>
> thanks again,
> mike
>
>
> "Chris Tacke, eMVP" <ctacke@NOinnovativedssSPAM.com> wrote in message
> news:u1qKzLAqDHA.1708@TK2MSFTNGP12.phx.gbl...
> > Currently Studio doesn't support what you're asking for. The best you
can
> > do is create a Smart Device app and avoid non-SD calls (or code for
them),
> > then test with a desktop project.
> >
> > -Chris
> >
> >
> >
> > "Mike" <vimakefile@yahoo.com> wrote in message
> > news:enIPb8$pDHA.3688@TK2MSFTNGP11.phx.gbl...
> > > A few questions:
> > > - I can create a new Smart Dev Application when I first create a
project
> > > from the New Project wizard, but how do I add CE as a build target
> later,
> > > after I've created a "Windows Application"? The configuration manager
> > > doesn't seem to let me do this. (E.g., I have a application that I
want
> > to
> > > work in multiple environments -- desktop, CE, etc., it will resize, or
> > > otherwise change behavior on the CE device.)
> > > - What about class libs -- will they work on both platforms? (There's
no
> > > "Smart dev classlib" option -- but I thought there were APIs and
> > > functionality not avail on all targets -- do I have to wait 'till
> runtime
> > > before I get an error?)
> > >
> > > thanks,
> > > mike
> > >
> > >
> > >
> >
> >
>
>



Re: Targeting .Net CF by r_z_aret

r_z_aret
Tue Nov 11 13:42:23 CST 2003

I don't use .NET, so my comments may be irrelevant, or only partly
relevant. (I use eVC 3 and 4 for CE, and VC 6 for desktop.)

I can think of at least 4 broad approaches to supporting multiple
platforms

1) completely separate code for each

2) use compiler directives to isolate platform-specific code

3) use run-time checks to load platform-specific code only when
available

4) avoid all platform-specific code (build to lowest common
denominator)

I mostly use approach 4, with a few compile-time switches and a few
run-time checks. I'm gradually adding more run-time checks. Some
compile-time checks
#ifdef UNDER_CE
#if _WIN32_WCE == 200
#ifdef WIN32_PLATFORM_PSPC
Run-time checks include checking screen dimensions and using them to
size dialog boxes and position controls. Methods of avoiding
platform-specific code include using FindWindow/ShowWindow instead of
SHFullScreen.


On Mon, 10 Nov 2003 18:54:19 -0800, "Mike" <vimakefile@yahoo.com>
wrote:

>A few questions:
>- I can create a new Smart Dev Application when I first create a project
>from the New Project wizard, but how do I add CE as a build target later,
>after I've created a "Windows Application"? The configuration manager
>doesn't seem to let me do this. (E.g., I have a application that I want to
>work in multiple environments -- desktop, CE, etc., it will resize, or
>otherwise change behavior on the CE device.)
>- What about class libs -- will they work on both platforms? (There's no
>"Smart dev classlib" option -- but I thought there were APIs and
>functionality not avail on all targets -- do I have to wait 'till runtime
>before I get an error?)
>
>thanks,
>mike
>
>
>

-----------------------------------------
To reply to me, remove the underscores (_) from my email address (and please indicate which newsgroup and message).

Robert E. Zaret
PenFact, Inc.
500 Harrison Ave., Suite 3R
Boston, MA 02118
www.penfact.com