Henkk is correct.
If you look in the project's AssemblyInfo.cs file (assuming
you're using
cs), you'll see this default entry:
//
// Version information for an assembly consists of the
following four
values:
//
// Major Version
// Minor Version
// Build Number
// Revision
//
// You can specify all the values or you can default the
Revision and
Build Numbers
// by using the '*' as shown below:
[assembly: AssemblyVersion("1.0.*")]
The vb version is the same to all intents and purposes.
If we take the format to mean
major_version.minor_version.build, then
the * in the build field is an instruction to VS to
increment the build
at each compile.
If you want to compile to a specific release, replace the
1.0.* with the
release number that you want - without any *s in it! E.g.
1.0.0, or
whatever conforms to your versioning conventions.
The first thing I do in anything other than simple test
projects is to
fix the version number by replacing the 1.0.* with something
relevant to
us. This is especially important for us, because we use
signed
assemblies exclusively.
HTH
Peter (another one)
-----Original Message-----
From: Discussion of development on the .NET platform using
any managed
language [mailto OTNET-CL
R DISCUSS.DEVELOP.COM] On Behalf Of henkk
Sent: 17 May 2006 09:48
To: DOTNET-CLR DISCUSS.DEVELOP.COM
Subject: Re: [DOTNET-CLR] Partial referencing strong named
assembly
Hi Peter,
If I understand correctly, you are under the impression that
version
numbers are automatically updated on each build. This is
definitely not
the case. You can explicitly control the version with an
attribute
(AssemblyVersionAttribute), or if you're doing VS2005 even
in the UI
(project properties).
Only if you explicitly tell the build environment (by having
*'s in your
version number) it will auto-increment the number for you.
When you put
a fully qualified version in (like
AssemblyVersion("2.2.0.2")) it will
always build that number.
I always explicitly set versions, because I am in control of
what breaks
and what doesn't old clients, not my compiler.
HTH,
-- Henkk
________________________________
From: Discussion of development on the .NET platform using
any managed
language on behalf of Peter van der Weerd
Sent: Wed 5/17/2006 8:06 AM
To: DOTNET-CLR DISCUSS.DEVELOP.COM
Subject: Re: [DOTNET-CLR] Partial referencing strong named
assembly
LoadFrom (It wasn't me who recommended that) will not work
since I 'm
using
a reference and don't load the assembly myself. However, if
one was
loading
the dll, yes, it could be an option.
Why would I want loading a signed dll with its partial name?
Well, I think strong names are too strong. Each time you
build an
assembly
its version (well, part of) is incremented, making it
nescessary to
rebuild
all your depending assemblies.
Since years we have the discipline to always keep dlls
backward
compatible,
and if not: just rename the dll (happens almost never).
Also: during the
nightly build the version numbers will be incremented,
leaving a dll
which
is perfectly usable by previous compiled applications, but
they cannot
be
loaded any more because of the strong name.
I can live with the versioning crab for dll's living in the
gac. It is
designed that way. But now I deal with a dll which is
unfortunately
signed
because the owner wanted to have the possibility to put it
in the gac.
Well,
I don't want to deploy parts of this application in the
gac, and choose
to
deploy the application the "normal way". And the
normal way of probing
will
check if the dll can be found in the application's
directory, and
reference
it with a partial name.
In IL I am able to do so (just leave out the .ver), but
VS2005 always
takes
the strong name if the assembly was signed. So the remaining
question
is: is
there an option in VS2005 to force a reference with a
partial name when
referencing signed assemblies?
However, you're probably right: doing things slightly
different than
microsoft designed is most of the time a bad idea.
P
----- Original Message -----
From: "Daniel Petersson"
<daniel.petersson CEFALO.SE>
To: <DOTNET-CLR DISCUSS.DEVELOP.COM>
Sent: Wednesday, May 17, 2006 7:10 AM
Subject: Re: [DOTNET-CLR] Partial referencing strong named
assembly
Hi, First of all would I like to state, WHY?
- if it is strongnamed, then it has a strongname and you
shouldn't mess around with the probing/loading scheme.
(it will only cause you problems in the end)
- you can do a version redirect through the .config file,
and this is probably what you should do if you are looking
to solve a patch/update scenario.
- even though Peter van der Weerd recomended you to use
LoadFrom( ... ) don't! use Load( ... ) and make sure that
you still follow the fusion load rules. Use fuslogvw.exe
to locate any loading issues.
Best Regards
Daniel Petersson
codefeed.blogspot.com
> -----Original Message-----
> From: Discussion of development on the .NET platform
using
> any managed language [mailto OTNET-CL
R DISCUSS.DEVELOP.COM]
> On Behalf Of Jim Miller (.NET)
> Sent: Wednesday, May 17, 2006 6:12 AM
> To: DOTNET-CLR DISCUSS.DEVELOP.COM
> Subject: Re: [DOTNET-CLR] Partial referencing strong
named assembly
>
> Don't try to load it using the assembly name, use the
file
> name where you've stored it, using LoadFrom.
>
> -----Original Message-----
> From: Discussion of development on the .NET platform
using
> any managed language [mailto OTNET-CL
R DISCUSS.DEVELOP.COM]
> On Behalf Of Peter van der Weerd
> Sent: Tuesday, May 16, 2006 8:52 AM
> To: DOTNET-CLR DISCUSS.DEVELOP.COM
> Subject: [DOTNET-CLR] Partial referencing strong named
assembly
>
> Hi All,
>
> I have a signed assembly A, *not* residing in the GAC.
>
> Now I want to build an assembly B (C# project in
VS2005)
> using this A, but with a *partial reference*: only
using the
> aseembly name without version information.
>
> How do I do that? I tried to set the "specific
version"
> property of the reference to false, but whatever I try,
the B
> is always linked to a the fully specified A.
>
> Any hints?
>
> Kind regards,
> Peewee
>
> ===================================
> This list is hosted by DevelopMentor(r) http://www.develop.com
>
> View archives and manage your subscription(s) at
> http://discuss.develop.com
>
> ===================================
> This list is hosted by DevelopMentor(r) http://www.develop.com
>
> View archives and manage your subscription(s) at
> http://discuss.develop.com
>
===================================
This list is hosted by DevelopMentor(r) http://www.develop.com
View archives and manage your subscription(s) at
http://discuss.develop.com
===================================
This list is hosted by DevelopMentor(r) http://www.develop.com
View archives and manage your subscription(s) at
http://discuss.develop.com
===================================
This list is hosted by DevelopMentor(r) http://www.develop.com
View archives and manage your subscription(s) at
http://discuss.develop.com
===================================
This list is hosted by DevelopMentorŪ http://www.develop.com
View archives and manage your subscription(s) at http://discuss.develop.com
|