AssemblyVersion vs AssemblyFileVersion vs AssemblyInformationalVersion
Codemia Knowledge Hub ·
AssemblyVersion is the version the .NET runtime uses for binding and strong-name resolution. AssemblyFileVersion is what Windows shows in file properties and is used for build tracking. AssemblyInformationalVersion is a free-form string for the human-readable product version, such as 2.1.0-beta.3. Knowing when to change each one prevents binding failures, stale cache hits and confusing release labels.
AssemblyVersion: the runtime identity
AssemblyVersion is embedded in the assembly manifest and used during strong-name binding. When an application is compiled against version 1.0.0.0 of a strong-named assembly, the runtime refuses to load version 2.0.0.0 at run time unless a binding redirect is in place.
- Format: strictly
Major.Minor.Build.Revision, all numeric. Wildcards like1.0.*are allowed in classic projects and make the compiler generate build and revision numbers. - Binding impact: changing
AssemblyVersionon a strong-named assembly is a breaking change. Every consumer must recompile or add a binding redirect. - Default: if omitted in an SDK-style project, it is
1.0.0.0.
Because a change forces every consumer to update, the common practice is to change AssemblyVersion only for major or breaking releases and keep it stable across minor updates and patches.
AssemblyFileVersion: the build identifier
AssemblyFileVersion maps to the Win32 file version resource and appears on the "Details" tab of file properties in Windows. The runtime does not use it for binding or loading, so changing it never breaks consumers.
- Format: the same four-part numeric format as
AssemblyVersion. - No binding impact: consumers do not need to recompile.
- Common use: incremented on every CI build. The build number or commit counter often goes in the third or fourth position, so each binary has a unique, traceable identifier.
If AssemblyFileVersion is not specified, it defaults to the value of AssemblyVersion.
AssemblyInformationalVersion: the product label
AssemblyInformationalVersion is a free-form display string. It can hold semantic version suffixes, branch names or commit hashes. NuGet uses it as the package version when no explicit PackageVersion is set.
- Format: no restrictions. Letters, digits, hyphens, dots and plus signs are all valid, so strings like
1.0.0-rc.1+sha.abc1234fit naturally. - No binding impact: the runtime ignores this attribute.
- Visible in:
Application.ProductVersionin WinForms,FileVersionInfo.ProductVersionin reflection, and the "Product version" field in Windows file properties.
If not specified, it defaults to the value of AssemblyVersion.
Side-by-side comparison
| Attribute | Format | Used by Runtime | Affects Binding | Common Change Frequency | Visible In |
AssemblyVersion | Major.Minor.Build.Revision (numeric) | Yes | Yes (strong name) | Major releases only | Assembly manifest, GAC |
AssemblyFileVersion | Major.Minor.Build.Revision (numeric) | No | No | Every build | Windows file properties |
AssemblyInformationalVersion | Freeform string | No | No | Every release | NuGet, product dialogs |
Versioning strategies
Lock AssemblyVersion, increment the others
This minimizes binding pain. AssemblyVersion stays at 1.0.0.0 across all 1.x releases, AssemblyFileVersion increments with each build, and AssemblyInformationalVersion carries the semantic version.
Many large .NET libraries use this strategy, including Newtonsoft.Json.
Increment all three together
Setting only the <Version> property is simpler to reason about, but it creates binding redirect overhead for strong-named assemblies. It works well for applications (EXEs) with no external consumers.
CI-driven with commit metadata
CI pipelines often stamp the informational version with the Git commit hash for full traceability:
Reading the three versions at runtime
This is useful for logging the exact build running in production or showing version details in an "About" dialog.
How SDK-style project properties map to attributes
| MSBuild Property | Assembly Attribute | Falls Back To |
<AssemblyVersion> | AssemblyVersionAttribute | 1.0.0.0 |
<FileVersion> | AssemblyFileVersionAttribute | AssemblyVersion value |
<InformationalVersion> | AssemblyInformationalVersionAttribute | AssemblyVersion value |
<Version> | Sets all three if individual properties are not specified | 1.0.0 |
<Version> is a shortcut. Setting <Version>2.0.0</Version> populates all three attributes, but any individually specified property takes precedence.
Versioning mistakes to avoid
Incrementing AssemblyVersion on every build of a strong-named assembly. Every consumer then has to recompile or add binding redirects on each release. Keep AssemblyVersion stable within a major version and increment FileVersion instead.
Confusing AssemblyVersion with the NuGet package version. NuGet uses AssemblyInformationalVersion (or the <Version> property) for the package version. A library with AssemblyVersion 1.0.0.0 and InformationalVersion 1.5.0 publishes as NuGet version 1.5.0.
Omitting FileVersion in CI builds. It then defaults to AssemblyVersion, so two builds of the same assembly version are indistinguishable. Include a build number in FileVersion.
Putting non-numeric text in AssemblyVersion. 1.0.0-beta in AssemblyVersion causes a build error. Pre-release labels belong in InformationalVersion.
Keeping AssemblyInfo.cs without setting GenerateAssemblyInfo to false. SDK-style projects generate assembly attributes automatically, so a manual AssemblyInfo.cs produces duplicate attribute errors. Delete the file or set <GenerateAssemblyInfo>false</GenerateAssemblyInfo>.
Related reading
- What are major differences between C and Java?
- What are .NET Assemblies?
- What are .NET Platform Extensions on docs.microsoft.com?
- What Are Some Good .NET Profilers?
- What are the benefits of resource.resx files?
- What are the benefits of using C vs F or F vs C?
- What are the best practices for using Assembly Attributes?
- What are the correct version numbers for C?

OOD Fundamentals
Master object-oriented design from first principles, SOLID, design patterns, and classic interview problems with hands-on coding.
View the courseData Structures & Algorithms practice on Codemia
Step through 300+ coding interview problems with animated visualisers that show the data structure changing as the code runs. The Blind 75 are free.