.NET components version control and consistency

  • Thread starter Thread starter phoenix
  • Start date Start date
Hi!

How can I achieve the situation like that:
there is some application (.NET) and it is using some class library
(strongly named, installed by .msi, registered within GAC). I'd like to have
a crash on my client application when the class library version differs from
the one compiled with my application earlier e.g. my_app_version1 and
my_class_lib_version1 works fine but my_app_version1 and
my_class_lib_version2 cause crash.

I have one approach but it doesn't fit my scheme: to pool all the assembly
strings out of code to .config file and supply them with version numbers
(then my class factories will not be able to instantiate some objects
because there will be a different version)

Thanks in advance for any advises/suggestions!
 
If I read your mail correctly, you are describing the default behaviour of
the runtime, so you dont have to do anything.
I'd like to have a crash on my client application

Your application won't crash, it just will not start.

Nick Holmes.
 
Absolutely correct, thank you Nick.

Now I've got the other point - to restrict application working with only
certain lib version - e.g. I have some library installed, I'm building my
project with that library although my project should work with it's older
version. The project compiles successfully (no interface differences), but
acutally there is an error prone situation because my project is expecting
to execute the older functionality of the library. Here I'd like to get an
error saying "wrong library/component version"

Any ideas?

Thank you.
 
Thanks phoenix,

strong naming is good (versioning stands on it). Although by itself, strong
naming seems not to be able in solve my problem.
 
Back
Top