.Net Versioning FAQ

1.                               
Must I use a Strong name?

 

1.1.             
Not if your assembly loads from a sub-directory of the ‘Application
Base’ [1]

 

2.                               
Can my dll load from the Application Base [1]?

 

2.1.             
Yes.  This is the simplest
choice.  No configuration is needed

 

3.                               
Can my dll load from a subdirectory of the Application Base [1]?

 

3.1.             
Yes.  If the subdirectory has
the same name as the dll then no configuration is required. 
Ie if xxx.dll is in [Application Base]\xxx\xxx.dll no configuration is
required.  If your dll resides in
another subdirectory then the easiest choice is to add a <probing> tag to
the config file.  See below for Can I edit the XML by hand?

 

4.                               
Does the runtime care about version numbers?

 

4.1.             
Not if you use a weak name

 

5.                               
…and if I use a strong name

 

5.1.             
You must have an assembly with the right version number. 
An assembly with the ‘wrong’ version number will work if you add a
suitable <bindingRedirect> tag to the config file. 
The binding redirect tag identifies dll versions that may be used in
place of the ‘correct’ one.  See below for Can I edit the XML by hand?

 

6.                               
If I have a version number, can I change the code and not change
the version?

 

6.1.             
If you can put your hand on your heart and say that the new file will
always substitute the old then you can just rebuild using the same old version
number.  Of course you now have no
idea what’s really in a version X file.  There is no check that the content of a Version X file is any
different to the content of any other Version X file.

 

7.                               
Can I load a dll from a directory that is not a subdirectory of the
Application Base
[1]?

 

7.1.             
Yes.  But you must use a
strong name.  You add a <codebase>
tag to tell the runtime where to look.  Be
careful.  You have to have
the fully qualified URL to the file, from protocol to extension. 
This conflicts with the hint in the configuration tool.  See below
for Can I edit the XML by hand?

 

8.                               
Can I edit the xml by hand?

 

8.1.             
Of course, but it’s very easy to get wrong. 
The runtime does not complain - it just does nothing. 
Use the MMC snap in.  (Administrative
Tools|Microsoft .Net Framework 1.1 Configuration). 
Expand applications and add the app you want to configure.

 

9.                               
Why doesn’t the FAQ answer my question?

 

9.1.             
Because it’s incomplete.  Sorry
– I’m doing my best!  If you get
the answer to your question email it to us
and I will add it.

 

[1]         Application Base – typically the directory that the Executable loaded from

Copyright 2002-15 by Dynamisys Ltd