This is an add-in for Fody
Adds the ability to specify the assembly MVID (Module Version Id).
According to the Standard ECMA 335 - Common Language Infrastructure (CLI) specification, the MVID value should be a random Guid each time the assembly is rebuilt:
The Mvid column shall index a unique GUID in the GUID heap (§24.2.5) that identifies this instance of the module. The Mvid can be ignored on read by conforming implementations of the CLI. The Mvid should be newly generated for every module, using the algorithm specified in ISO/IEC 11578:1996 (Annex A) or another compatible algorithm.
ECMA-335.pdf
, page 265.
This means, USE AT YOUR OWN RISK!
https://nuget.org/packages/Mvid.Fody/
PM> Install-Package Mvid.Fody
Add the following declaration to your code (typically, AssemblyInfo.cs
):
[assembly: Mvid("your-guid-string)"]
Note: the GUID string can be in any format that is supported by Guid.Parse
.
The compiled assembly will have an MVID value of the specified GUID, and the custom MvidAttribute
will be removed from the assembly.
Icon courtesy of The Noun Project