Writing an auto-update applet

R

Richard Thombs

I am trying to design an auto-update applet for my Pocket PC application
and I have hit two distinct problems that I would love some help with:

First off, I _thought_ that when the CLR was trying to resolve a
reference to an assembly, it only looked at the major.minor of the
assembly's version number.

All my assmblies use 1.0.* as the version info. When I recompile just
one of the assemblies and copy it onto my device, I get a
TypeLoadException because the application is still trying to bind to the
old version of the assembly. For example:

Old SqlCE_DAL.DLL: 1.0.1630.0
New SqlCE_DAL.DLL: 1.0.1632.0

When I run the application it craps out indicating that it failed to
load the old 1.0.1630 version. I would have expected the runtime to pick
up the newer 1.0.1632 version because the major and minor are still the
same.

Secondly, how can I determine the correct processor type to download to
the PocketPC? I want to be able to download processor specific DLLs,
such as the SqlCe hotfix which comes in different processor flavours. In
the OpenNETCF.Win32.Core.GetSystemInfo() I can retrieve a bunch of
information about the processor type, but I notice that there is no
combination of properties that I can piece together into 'ARM4'.

Alternatively, does anyone know of an auto-update walkthrough on the web?

Thanks everyone,

Richard.
 
A

Alex Feinman [MVP]

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnnetcomp/html/AutoUpdater.asp

This is something I've written on the subject. I do not allow per-component
update though. In fact I am not sure it is such a good idea. To me
redistributing a (signed) CAB is simpler. Of course it won't work for the
shared components, which is another reason not to use shared components
(this is how flame war starts) or at least not to use version autoincrement
in shared components.

As for detecting the CPU architecture, here is another sample of mine which
deals with it.
http://www.alexfeinman.com/download.asp?doc=VBInteropEmu.zip

(this link might not work in the next hour or so due to the server being
worked on)
 

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