473,569 Members | 2,573 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Assembly Version

Hi,

Can VB.Net change the next assembly version automatically when I compile the
program?

<Assembly: AssemblyVersion ("1.0.0.1")>
<Assembly: AssemblyFileVer sion("1.0.0.1") >

Thanks

James
Jan 5 '07 #1
5 2481
James Wong wrote:
Can VB.Net change the next assembly version automatically when I compile the
program?
Yes, but not, IMHO, to anything useful or meaningful.
<Assembly: AssemblyVersion ("1.0.*.*")>
This will generate the last two parts of the version based on rules best
known to Visual Studio itself.
However, if your Assemblies go anywhere near the Global Assembly Cache,
I would recommend /against/ using the above. Take control of the
version numbering yourself in such cases. Otherwise, you can wind up
with [literally] dozens of versions cluttering up the GAC, with little,
if any, chance of working out which ones you can safely get rid of...

HTH,
Phill W.
Jan 5 '07 #2
James Wong wrote:
Can VB.Net change the next assembly version automatically when I
compile the program?
Not in the way it worked in VB6; the "asterisk" version number can be used,
but as already pointed out by Phill W., this is less than satisfactory.

We use a macro to do this for us. It's fairly heavily customised but based
on the original that you can find here:

http://www.jmedved.com/default.aspx?...ml&language=en

Be aware however this will run EVERY time you compile, which can amount to
hundreds of times over the repeated test/debug sequence involved in write an
application. We use the macro just on our clean-build machines, not on our
development machines, so the build number is only actually incremented when
a new version of the component is prepared for release.

HTH,

--

(O)enone
Jan 5 '07 #3


"Oenone" <oe****@nowhere .comwrote in message
news:#c******** *****@TK2MSFTNG P06.phx.gbl...
James Wong wrote:
>Can VB.Net change the next assembly version automatically when I
compile the program?

Not in the way it worked in VB6; the "asterisk" version number can be
used, but as already pointed out by Phill W., this is less than
satisfactory.

We use a macro to do this for us. It's fairly heavily customised but based
on the original that you can find here:

http://www.jmedved.com/default.aspx?...ml&language=en

Be aware however this will run EVERY time you compile, which can amount to
hundreds of times over the repeated test/debug sequence involved in write
an application. We use the macro just on our clean-build machines, not on
our development machines, so the build number is only actually incremented
when a new version of the component is prepared for release.

HTH,

--

(O)enone
Why? When you "build" a debug version, it's a new build. If you changed
ANYTHING, it's a different build when you build it. Why not let the
compiler automatically update the build number?

What we do in-house, and yes most of our library assemblies are GAC'ed, is
set the AssemblyVersion attribute to 1.0.*. When we are satisfied with a
particular build in debug mode and we prepare for release, we change it to a
release build and compile and send for Q&A. Once all is done, we create our
installation packages and label it in SourceSafe.

When we need to modify the library, and we have only non-breaking, non-major
changes to the library, we will manually up the minor version to 1.1.* and
keep it at 1.1.* until after we Release. If we have breaking or major
changes, we up the major version to 2.0.*. The way we setup our tests, so
we don't have GAC hell, is our test projects reference the debug assemblies
via a project reference. When we are ready for deployment, our real
projects reference the assemblies from the GAC. Therefore, only Release
assemblies are installed into the GAC via our installers and the debug
assemblies are not.

HTH,
Mythran
Jan 5 '07 #4
"James Wong" <cp*******@nosp am.nospamschrie b:
Can VB.Net change the next assembly version automatically when I compile
the program?

<Assembly: AssemblyVersion ("1.0.0.1")>
<Assembly: AssemblyFileVer sion("1.0.0.1") >
Check out the documentation on the constructors of
'AssemblyVersio nAttribute' and 'AssemblyFileVe rsionAttribute' . If you want
build and release number to be set automatically, use a version
specification like "1.0.*".

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://dotnet.mvps.org/dotnet/faqs/>

Jan 5 '07 #5
Mythran wrote:
Why? When you "build" a debug version, it's a new build. If you
changed ANYTHING, it's a different build when you build it. Why not
let the compiler automatically update the build number?
We have some fairly specific requirements for DLL versioning, a very
disciplined release build procedure, and some custom-written solutions for
application deployment too. We don't use the GAC at all. For our purposes
the macro approach I described works perfectly. It may not for others, but
it's a possible solution and certainly worthy of consideration IMO.

--

(O)enone
Jan 5 '07 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
8776
by: Terence Shek | last post by:
Is there a way to set the application binding policy so that it always binds to the latest version of an assembly? I'm hoping there is a way to avoid updating the application's binding configuration every time there is an update to a shared assembly.
3
12166
by: Michael Bøcker-Larsen | last post by:
Hi I'v been stuck on this problem for ages now. I have found that I'm not the only one with this problem, by looking through the different newsgroups. Hope you can help me! I know there is a lot of information, but if you need more (e.g. the code) please write michael@mblarsen.dk. The problem is this error messages (the code is build...
10
3426
by: jojobar | last post by:
Hello, I am trying to use vs.net 2005 to migrate a project originally in vs.net 2003. I started with creation of a "web site", and then created folders for each component of the site. I read somewhere that each folder under the "web site" is compiled in separate assembly. I however, did not find that the "web site" creation in vs.net...
1
2059
by: Andrew | last post by:
In ASP.NET 1.1 I used to retreive the version of my code-behind assembly using following syntax: Assembly.GetExecutingAssembly().GetName().Version The version was defined in AssemblyInfo.cs using After migrating to ASP.NET 2.0 this line of code always return 0.0.0.0. How do I retreive the assembly version of ASP.NET application? Thanks
7
10943
by: R Reyes | last post by:
Can someone please explain to me why I can't get the MS Word Interop assembly to work in my VS2005 project? I'm trying to manipulate MS Word from my Web Form application and I can't get passed this screen below. Please help, thanks in advance... Configuration Error Description: An error occurred during the processing of a configuration...
3
4389
by: Richard Lewis Haggard | last post by:
We are having a lot of trouble with problems relating to failures relating to 'The located assembly's manifest definition with name 'xxx' does not match the assembly reference" but none of us here really understand how this could be an issue. The assemblies that the system is complaining about are ones that we build here and we're not changing...
5
12085
by: Laurence | last post by:
In VS.2005 using VB.NET There are two versions on every project, The Assembly Version and the File Version. Why are there two different versions? As far as I can tell, there is not need for two versions. The assembly is the file, isn't it?
1
2241
by: Coaster | last post by:
orig ref here http://groups.google.com/group/microsoft.public.dotnet.framework.aspnet/browse_thread/thread/ff29cc370678911d/c0db5b7e3da283b9?lnk=st&q=gac+assembly+new+version&rnum=7#c0db5b7e3da283b9 I have pasted the part I'm interested in below. My company doesn't use versioning or the gac and I'd like to. We're on vs.net 2005 & .net 2.,...
1
7369
by: nish85 | last post by:
Hi, i have uploaded my sit to web server goddady.com i have a button to download dyanmically generated excel file.This button is ajax enabled.....When i am click on this button it will popup a message like "That assembly does not allow partially trusted callers" This is my web.config file Please help me on this issue? <?xml...
4
3163
by: Bob Altman | last post by:
Hi all, I have a C++/CLI project (VS 2005) that produces a DLL that exports C bindings. Internally, this DLL contains routines compiled with /clr. I notice that my DLL doesn't have a version resource. I assume that, unlike C# and VB, C++ doesn't automatically generate a version resource. Is there any way to make this happen? In...
0
7701
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7615
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
7924
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
1
7677
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
6284
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5514
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
5219
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3653
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
1
1223
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.