Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/dotnet-interactive.Tests/MagicCommandTests.about.cs
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ public async Task it_shows_the_product_name_and_version_information()
.ContainAll(
".NET Interactive",
"Version",
"Library version",
"https://github.com/dotnet/interactive");
}
}
Expand Down
7 changes: 7 additions & 0 deletions src/dotnet-interactive/KernelExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
using System.CommandLine;
using System.CommandLine.Invocation;
using System.CommandLine.NamingConventionBinder;
using System.Reflection;
using System.Threading.Tasks;
using Microsoft.DotNet.Interactive.Formatting;
using Microsoft.DotNet.Interactive.Utility;
Expand Down Expand Up @@ -47,6 +48,11 @@ public static T UseAboutMagicCommand<T>(this T kernel)

}

var libraryAssembly = typeof(Kernel).Assembly;
var libraryInformationalVersion = libraryAssembly
.GetCustomAttribute<AssemblyInformationalVersionAttribute>()
.InformationalVersion;

PocketView html = table(
tbody(
tr(
Expand All @@ -55,6 +61,7 @@ public static T UseAboutMagicCommand<T>(this T kernel)
p[style: "font-size:1.5em"](b(".NET Interactive")),
p("© 2020 Microsoft Corporation"),
p(b("Version: "), info.AssemblyInformationalVersion),
p(b("Library version: "), libraryInformationalVersion),
p(b("Build date: "), info.BuildDate),
p(a[href: url](url))
))
Expand Down