Req Help with Assembly versioning issues.


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
 
Ad

Advertisements

M

Mattias Sjögren

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
 
Ad

Advertisements

P

pseudonym

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
 

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