We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 7d4dc8c + 24b4471 commit 61cfbb3Copy full SHA for 61cfbb3
README.md
@@ -56,6 +56,17 @@ If there are additional commands and output that are needed to be included in th
56
</ItemGroup>
57
```
58
59
+### Extract Assembly Metadata
60
+
61
+```csharp
62
+using System.Reflection;
63
64
+string gitHash = Assembly
65
+ .GetEntryAssembly()
66
+ .GetCustomAttributes<AssemblyMetadataAttribute>()
67
+ .FirstOrDefault(attr => attr.Key == "GitHash")?.Value;
68
+```
69
70
## Version History
71
_2.0.2_
72
- Fix issues introduced by changes from the Microsoft.NET.Sdk.
0 commit comments