Dotnet Assembly Versioning

B

Ben

Hi all,

First i have to state this is my first entry ever in a forum. So
please be forgiving...

I am a newbe to dotnet versioning...

The Situation is the following: Our application is using an external
managed .dll. Whos version is changing from time to time. The
interface is not changing at all. As i have included this dll in my
project i have to rebuild my application everytime the version number
is augmenting : 1.0.x.y. The major and minor build version do not
change.

using .net compact framework 1.1

Isnt it possible to state a policy that if x and y are changing the
clr still accepts these version numbers without recompiling my
application?

For any help thanks in advance

Ben
 
S

Scott M.

The reason you have to recompile is that when you compile, you are going and
getting a copy of the .dll and bringing it locally into your application.
This only happens when you compile so, if you want the newer assembly, you
have to recompile.

Now, if the assembly were to become a shared assembly that is registered
into the GAC, then all you'd need to do is update the GAC with the new
assembly and your application would continue to run without any work needed.

-Scott
 
R

Rad [Visual C# MVP]

The reason you have to recompile is that when you compile, you are going and
getting a copy of the .dll and bringing it locally into your application.
This only happens when you compile so, if you want the newer assembly, you
have to recompile.

Now, if the assembly were to become a shared assembly that is registered
into the GAC, then all you'd need to do is update the GAC with the new
assembly and your application would continue to run without any work needed.

-Scott

news:[email protected]...

Really? I beg to differ. If this were the case it would re-introduce DLL
hell.

However there is a workaround if you don't want to recompile you can use a
feature called binding redirection to well ... redirect calls for one
version to another.

You can read on this here
http://msdn.microsoft.com/library/d.../en-us/cpgenref/html/gngrfbindingredirect.asp
 
S

Scott M.

How so? If the version number is not changing and it is a shared assembly
then no copy is being made locally and the app uses the shared assembly.
 
R

Rad [Visual C# MVP]

How so? If the version number is not changing and it is a shared assembly
then no copy is being made locally and the app uses the shared assembly.

If the version number changes (as I think the OP says) I believe it is a
valid assumption on the part of the CLR that something may have changed in
the DLL, whether or not this may actually be the case, and therefore
putting it into the GAC will not solve the ambiguity
 
G

Guest

Did you try creating an interface for your external dll, and then try to
access it. I am talking about accessing an implementation through an
interface.

An even better solution would be to use that external dll as a web-service.
That way you won't have to rebuild your solution, so long as your interface
does not change.

Thanks,
 

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