Skip to content

Commit

Permalink
Fix unique ID (#8971)
Browse files Browse the repository at this point in the history
  • Loading branch information
KevinRansom authored Apr 17, 2020
1 parent e6b00af commit c965e12
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions src/absil/il.fs
Original file line number Diff line number Diff line change
Expand Up @@ -354,8 +354,17 @@ let isMscorlib data =

[<Sealed>]
type ILAssemblyRef(data) =
let uniqueStamp = AssemblyRefUniqueStampGenerator.Encode data
let uniqueIgnoringVersionStamp = AssemblyRefUniqueStampGenerator.Encode { data with assemRefVersion = None }
let pkToken key =
match key with
| Some (PublicKey bytes) -> Some (PublicKey (SHA1.sha1HashBytes bytes))
| Some (PublicKeyToken token) -> Some (PublicKey (token))
| None -> None

let uniqueStamp =
AssemblyRefUniqueStampGenerator.Encode { data with assemRefPublicKeyInfo = pkToken (data.assemRefPublicKeyInfo) }

let uniqueIgnoringVersionStamp =
AssemblyRefUniqueStampGenerator.Encode { data with assemRefVersion = None; assemRefPublicKeyInfo = pkToken (data.assemRefPublicKeyInfo) }

member x.Name=data.assemRefName

Expand Down

0 comments on commit c965e12

Please sign in to comment.