I have a 3rd party C++/CLR assembly. When I right click the dll, the version tab shows 5.32.1 but when the meta information in ILSpy shows 5.0.0. Why is this difference? Which one is the one that is correct?
The file version as it's shown in property tab of Windows Explorer corresponds to the .NET assembly AssemblyInformationalVersion
attribute. AssemblyVersion
is a separate independent thing.
And of course, neither of the two is more correct than the other one, the developer can set them independently.
For the AssemblyVersion
the current practice seems to be roughly "the assemblies with the same major.minor version should be compatible", but nothing really enforces this rule.
Necessary correction: Actually, the policy enforced by the current CLR assembly binding is that the whole assembly version should match in order to be loadable, so the compatible assemblies should have the same assembly version. More on the topic: What are differences between AssemblyVersion, AssemblyFileVersion and AssemblyInformationalVersion?