Req Help with Assembly versioning issues.

  • Thread starter Thread starter pseudonym
  • Start date Start date
P

pseudonym

Hi all,

I need some help solving some versioning issues across modules.

To Over-simplify our application:

MyEXE.exe references MyCoolStuff.dll for an interface definition, and some
core routines. At Runtime it loads a configuration file. Each line in the
file describes an assembly/class that implements our interface definition.
For each line in the file, MyEXE instantiates the class and calls some
methods. This continues until an exit condition is met, or there are no more
lines in the file.

Along with the MyEXE shell, we're now creating our processing objects,
obviously each has to reference MyCoolStuff.dll for the interface
definition, but also for the core routines. BTW, all are strong named with
the same key file to help ensure we're the only ones creating these...

Anyway, from what I've experienced so far (which isn't much) If I re-build
MyCoolStuff.dll to fix a bug, I also need to re-build ALL modules that
reference it or I get an error "The located assembly's manifest definition
with the name 'MyCoolStuff.dll' does not match the assembly reference"
whenever MyEXE tries to load a .dll that hasn't been re-built.

I'm guessing this is due to the assembly version. (1.0.*) and the fact that
the build/revision numbers get auto updated. I could set fixed values, but
that defeats the purpose of having version numbers to begin with.

So my question is how can I make it possible to update MyCoolStuff.dll
without having to rebuild everything every time. Is there a way to say any
1.0.x.x is acceptable ??? Or at the least any 1.0.x.x where 1.0.x.x >
referenced version?

Thanks

Nick
 
I'm guessing this is due to the assembly version. (1.0.*) and the fact that
the build/revision numbers get auto updated.
Right


I could set fixed values, but
that defeats the purpose of having version numbers to begin with.

Not necessarily. Some recommend not changing the assembly version
during development. See

http://blogs.gotdotnet.com/suzcook/permalink.aspx/cc6428d6-69fb-4f05-8f18-65f3eac85274

So my question is how can I make it possible to update MyCoolStuff.dll
without having to rebuild everything every time. Is there a way to say any
1.0.x.x is acceptable ??? Or at the least any 1.0.x.x where 1.0.x.x >
referenced version?

Read about <bindingRedirect> in the docs.



Mattias
 
Mattias,

Thanks for your help. I think we'll be locking the AssemblyVersion to a
fixed value, and using the AssemblyFileVersion
to keep track of any 'fix' releases.

Since .NET doesn't like it when you say AssenblyFileVersion("1.0.*") I wrote
an Add-In that mimics the behavior of
AssemblyVerions("1.0.*"). If anyone else wants it, you can find it here:
http://home.cfl.rr.com/njfiorello/autofile


Nick
 
Back
Top