Why is this an issue?

The AssemblyVersion attribute is used to specify the version number of an assembly. An assembly is a compiled unit of code, which can be marked with a version number by applying the attribute to an assembly’s source code file.

The AssemblyVersion attribute is useful for many reasons:

If no AssemblyVersion is provided, the same default version will be used for every build. Since the version number is used by .NET Framework to uniquely identify an assembly, this can lead to broken dependencies.

How to fix it

Code examples

Noncompliant code example

Imports System.Reflection
<Assembly: AssemblyTitle("MyAssembly")> ' Noncompliant
Namespace MyLibrary
' ...
End Namespace

Compliant solution

Imports System.Reflection
<Assembly: AssemblyTitle("MyAssembly")>
<Assembly: AssemblyVersion("42.1.125.0")>
Namespace MyLibrary
' ...
End Namespace

Resources

Documentation