Intrigued by the events chronicled here (also here and here), I saw the inherent utility in having a program-specific GUID available. The SO answers that were correct seemed a bit tightly-coupled and verbose. So I set out to make my own for use. Looking for a critique on the idea itself as well as maintainability, performance, etc. Improvements welcome.
public static class AssemblyExtensions
{
/// <summary>
/// The <see cref="GuidAttribute"/> for the entry assembly lazily gotten as a <see cref="Guid"/> if it exists,
/// <see cref="Guid.Empty"/> otherwise.
/// </summary>
private static readonly Lazy<Guid> _MyGuid = new Lazy<Guid>(() => Assembly.GetEntryAssembly().GetGuid());
/// <summary>
/// Lazily gets the <see cref="GuidAttribute"/> for the entry assembly as a <see cref="Guid"/> if it exists,
/// <see cref="Guid.Empty"/> otherwise.
/// </summary>
/// <returns>The <see cref="GuidAttribute"/> for the entry assembly as a <see cref="Guid"/> if it exists,
/// <see cref="Guid.Empty"/> otherwise.</returns>
public static Guid GetMyGuid() => _MyGuid.Value;
/// <summary>
/// Gets the <see cref="GuidAttribute"/> for the given assembly as a <see cref="Guid"/> if it exists,
/// <see cref="Guid.Empty"/> otherwise.
/// </summary>
/// <param name="assembly">The assembly.</param>
/// <returns>The <see cref="GuidAttribute"/> for the given assembly as a <see cref="Guid"/> if it exists,
/// <see cref="Guid.Empty"/> otherwise.</returns>
public static Guid GetGuid(this Assembly assembly) => Guid.TryParse(
((GuidAttribute)assembly?.GetCustomAttributes(typeof(GuidAttribute), false).SingleOrDefault())?.Value,
out Guid guid) ? guid : Guid.Empty;
}