diff --git a/README.md b/README.md index 56d745e..b4e1f5e 100644 --- a/README.md +++ b/README.md @@ -56,6 +56,17 @@ If there are additional commands and output that are needed to be included in th ``` +### Extract Assembly Metadata + +```csharp +using System.Reflection; + +string gitHash = Assembly + .GetEntryAssembly() + .GetCustomAttributes() + .FirstOrDefault(attr => attr.Key == "GitHash")?.Value; +``` + ## Version History _2.0.2_ - Fix issues introduced by changes from the Microsoft.NET.Sdk.