473,396 Members | 1,815 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Assembly version vs. File version

In the Assembly Information, you can set the assembly version and the
file version. What is the difference between the two? The
documentation is not exactly helpful in this area.

I had the assembly version set to a unique number, and just left the
file version as 0.0.0.0. My program crashed on another computer, and
the windows error report stated: "AppVer: 0.0.0.0", so I am thinking
maybe the file version is more important (unless this was an older
version of my program that had BOTH assembly and file version set to
0.0.0.0).

When you right-click properties of a file, it shows the File version
at the top, and both assembly and file versions inthe list box at the
bottom, with assembly listed first.

It is totally unclear to me what either is for, which is more
important. For now, I'll just set them to both be the same.

Zytan

Apr 28 '07 #1
6 17183
Without trying to sound daft, the assembly version controls the
version of the assembly, and the file version controls the version of
the file. If may be useful to keep them in sync, but note that
"fusion" uses the assembly version as part of the identity when asking
"is this the right dll". The file version is not really used so much
by .Net, but may be used by OS tools. Changing the assembly version of
a strongly named assembly generally requires you to tell the callers
to forward to the new version (via policy), else recompile.

Right or wrong, I have tweaked my build process to timestamp the build
into the file version, but it leaves the assembly version for manual
planned change. That way I can always track the history of a dll,
without quite as much pain for releasing a hotfix as changing the
assembly version.

Marc

Apr 28 '07 #2
Hi Marc,

Would you mind share with us how u did it?
Thanks,
Ignacio

"Marc Gravell" <ma**********@gmail.comwrote in message
news:11**********************@o5g2000hsb.googlegro ups.com...
Without trying to sound daft, the assembly version controls the
version of the assembly, and the file version controls the version of
the file. If may be useful to keep them in sync, but note that
"fusion" uses the assembly version as part of the identity when asking
"is this the right dll". The file version is not really used so much
by .Net, but may be used by OS tools. Changing the assembly version of
a strongly named assembly generally requires you to tell the callers
to forward to the new version (via policy), else recompile.

Right or wrong, I have tweaked my build process to timestamp the build
into the file version, but it leaves the assembly version for manual
planned change. That way I can always track the history of a dll,
without quite as much pain for releasing a hotfix as changing the
assembly version.

Marc

Apr 29 '07 #3
Nothing very sophisticated I'm afraid. I considered some funky MSBuild
add-ins, but chickened out. Basically I have a build script (actually
a C# exe) that traverses a source tree looking for things to build
(updating references / dependencies, setting config for the
environment [WCF endpoints, etc], figuring out the build order etc); I
simply added a few lines into that which use a regex to find and
update the necessary attribute in the source code. Similar to the
standard VS auto-versioning, but with an offset that won't run out of
numbers for a few extra decades.

Sorry it wasn't something more exciting ;-p

Marc

Apr 29 '07 #4
Ok, so basically the assembly is one whole compilation, and that has a
number. But, the file version refers to the final .exe made, so it is
also the entire assembly. I still fail to see the difference.

Maybe someone can explain what the difference between file and
assembly is in terms of a final exe file?

Thanks,
Zytan

Apr 29 '07 #5
>Maybe someone can explain what the difference between file and
>assembly is in terms of a final exe file?
You can create so called multi-module assemblies, where one assembly
spans over more than one executable file. It's not that common, but in
such a scenario you'd have a single assembly version while each
executable could have its own file version.
Mattias

--
Mattias Sjögren [C# MVP] mattias @ mvps.org
http://www.msjogren.net/dotnet/ | http://www.dotnetinterop.com
Please reply only to the newsgroup.
Apr 30 '07 #6
You can create so called multi-module assemblies, where one assembly
spans over more than one executable file. It's not that common, but in
such a scenario you'd have a single assembly version while each
executable could have its own file version.
Ok thanks, Mattias

Zytan

May 1 '07 #7

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

Similar topics

2
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...
3
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...
3
by: Karl Hungus | last post by:
A cs file I compiled into an assembly dll is in my bin directory. In the cs file I have a using statement for System.Xml I compiled it using this command: csc /out:XmlContent.dll /t:library...
10
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...
1
by: Robert | last post by:
I have a server where the main web application (root) is now migrated to 2.0. It's web.config has a line where it adds the system.data.oracleclient in the configuration and assembiles section. ...
7
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...
3
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...
5
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...
1
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...
4
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...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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...
0
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,...
0
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...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
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,...

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.