DLL and EXE versions

G

Guest

Hi!

What's the deal with dll and exe versions? I have a problem with versions of
dll:s and exe:s being incompatible with eachother. Is there any way to get
around this?

Is I understand it, a guid is generated for the dll when it's compiled (is
this PublicKeyToken?). When the exe is compiled together with the dll, it is
linked to the dll with the specific guid. This implies that the exe won't run
if the dll has a different guid, which it will have if the dll is recompiled.
Best case scenario: Windows tells the user that the versions aren't
compatible. Worst case scenario: The application simply fails to start.

Any suggestions?

Thanks in advance,
Nille
 
M

Mattias Sjögren

Is I understand it, a guid is generated for the dll when it's compiled (is
this PublicKeyToken?).

No, it's the module version id (MVID).

When the exe is compiled together with the dll, it is
linked to the dll with the specific guid.

No, the MVID doesn't affect versioning. Only the full assembly name
does.



Mattias
 
G

Guest

Ok, so where does this leave me? Why doesn't my app start when I use dll:s
that wasn't used when the application was compiled? This is what I have:

I have a .NET CF app that uses two dll:s. These are used by simply adding
references in VS. If I compile and deploy through VS, everything works as
expected (i.e. the app starts). If I recompile the dll:s (without changing
them) and copy them to the device -- replacing the old dll:s -- the app fails
to start.

Why is this?

Thanks in advance,
Nille
 

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