Same codebase for Windows CE 6 and desktop (Windows XP)?

T

Thomas Steinmaurer

Hello,

we are writing an .NET based application for Windows CE 6. This includes
a graphical user interface, reading data from the CAN bus, storing data
in SQL CE, ...

The primary target platform is Windows CE 6 with the .NET compact
framework, but ideally, the same application should also run on the
desktop (Windows XP) under the .NET framework, especially the graphical
user interface part for displaying measurement data. Although reading
data won't be from the CAN bus then, but from the COM port ...

Basically, are there any ideas, best practices for having one code base
and two target platforms (embedded and desktop)? How is that handled in
Visual Studio, ...


Thanks,
Thomas
 
C

Carsten Unterberg

Hey Thomas,

Thomas Steinmaurer said:
Hello,

we are writing an .NET based application for Windows CE 6. This includes a
graphical user interface, reading data from the CAN bus, storing data in
SQL CE, ...

The primary target platform is Windows CE 6 with the .NET compact
framework, but ideally, the same application should also run on the
desktop (Windows XP) under the .NET framework, especially the graphical
user interface part for displaying measurement data. Although reading data
won't be from the CAN bus then, but from the COM port ...

Basically, are there any ideas, best practices for having one code base
and two target platforms (embedded and desktop)? How is that handled in
Visual Studio, ...

in my opinion, it is not so difficult to develop a program which runs on
both platform with the same case.

At first, you should know that you primary develop for the .Net Compact
Framework, which is just a subset of the Desktop-version. Visual Studio
handles is as an solution for smart devices.

If you just use 'plain' .Net-code without any platform invokes or stuff like
that, you program should run on the desktop without any problems. If you use
libraries for a special hardware that it becomes diffifcult.
If you have to use platform invokes, you should try to substitute the Api
calls for coredll.dll to Api calls for gdi32.dll or user32.dll, etc.

If you may have any questions, fell free to ask.

Regards,

Carsten Unterberg | Test-Framework
http://test-framework.blogspot.com/
 
T

Thomas Steinmaurer

Hi Carsten,
in my opinion, it is not so difficult to develop a program which runs on
both platform with the same case.

At first, you should know that you primary develop for the .Net Compact
Framework, which is just a subset of the Desktop-version. Visual Studio
handles is as an solution for smart devices.

If you just use 'plain' .Net-code without any platform invokes or stuff like
that, you program should run on the desktop without any problems. If you use
libraries for a special hardware that it becomes diffifcult.
If you have to use platform invokes, you should try to substitute the Api
calls for coredll.dll to Api calls for gdi32.dll or user32.dll, etc.

If you may have any questions, fell free to ask.

In a first step, it's all about basics. For example, from a development
environment POV, how can I handle two platforms in Visual Studio? Two
projects/solutions including the same source?

Are there any "getting starting guides" for developing for two platforms
possibly with the same code base?


Thanks,
Thomas
 
C

Carsten Unterberg

Hi Thomas,

Thomas Steinmaurer said:
Hi Carsten,

In a first step, it's all about basics. For example, from a development
environment POV, how can I handle two platforms in Visual Studio? Two
projects/solutions including the same source?

Are there any "getting starting guides" for developing for two platforms
possibly with the same code base?

for the IDE, it is just a normal solution for a smart device. When I try to
debug such a solution which is orginally for a smart device on the desktop,
I compile it and starts the exe-file with the explorer. After the exe-file
is started, I switch to the IDE, choose "Debug" and "Attact to Process". In
the next dialog window you need to select which type of code you want to
debug. Just click on the "Select" button and select all you want to debug
(in your case I think just managed code). Than lick on the "OK" button.
At next you need to select the process you want to debug. Select the process
in the list "Available process" and click on the Button "Attach".
Now, Visual Studio debugs your .Net Compact Framework program on the
Desktop.

Regards,

Carsten Unterberg | Test-Framework
http://test-framework.blogspot.com/
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top