Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What's the difference between a dll's FileVersion and ProductVersion?

What's the difference between a dll's FileVersion and ProductVersion?

Specifically at runtime, is one used for strong binding, and the other informational?

I'd like to have one set manually, and the other incremented automatically (via our CI build process)

Edit: Richard answered the part I missed in the original question. It's Assembly version that I want to manually control (incrementing with interface changes) while it's File Version that I want my CI system to automatically increment with every build. Thanks.

like image 412
Peter Drier Avatar asked Apr 15 '09 15:04

Peter Drier


People also ask

What is Assembly version and file version?

It's the version number given to file as in file system. It's displayed by Windows Explorer, and never used by . NET framework or runtime for referencing.

How do I find the Assembly version?

I can get the Assembly Version with the following line of code: Version version = Assembly. GetEntryAssembly(). GetName().

Where do I put DLL files in Visual Studio?

What you have to do is create a folder, within the solution folder for example, and reference the dlls in your projects. Any third-party dll that is in the references of a project will be copied to the bin/Debug or bin/Release folder when the project is compiled.


1 Answers

Files are distributed as part of a larger project. A file with individual build version x might be distributed as part of project version y.

To elaborate: A.exe with product version 1.1 ships with files B.dll and C.dll. All start out with matching product and file versions. Then someone finds a serious bug in the product. The developer looks at it, and issues a fix that only updates B.dll. Now the product version probably updates as well, to 1.1.1 to account for the minor fix. And B.dll's file version will also be 1.1.1. But A.exe and C.dll didn't change, and so their file version might still be 1.1.

like image 91
Joel Coehoorn Avatar answered Oct 07 '22 16:10

Joel Coehoorn