Why is this an issue?
If no AssemblyVersionAttribute
is provided, the same default version will be used for every build. Since the version number is used by
The .NET Framework to uniquely identify an assembly this can lead to broken dependencies.
Noncompliant code example
using System.Reflection;
[assembly: AssemblyTitle("MyAssembly")] // Noncompliant
namespace MyLibrary
{
}
Compliant solution
using System.Reflection;
[assembly: AssemblyTitle("MyAssembly")]
[assembly: AssemblyVersion("1.2.125.0")]
namespace MyLibrary
{
}
Resources
Microsoft documentation - Assembly Versioning