From 618a8f0b90d01db1feaaa6faafd841f27bf57a29 Mon Sep 17 00:00:00 2001 From: Ben Pearce Date: Thu, 8 May 2025 16:57:57 +1000 Subject: [PATCH] added output for selfcontained .net8 cli --- .gitignore | 2 ++ source/Octodiff/CommandLine/HelpCommand.cs | 4 ++-- source/Octodiff/Octodiff.csproj | 9 +++++---- 3 files changed, 9 insertions(+), 6 deletions(-) diff --git a/.gitignore b/.gitignore index bc018e3..355de8c 100644 --- a/.gitignore +++ b/.gitignore @@ -179,3 +179,5 @@ source/SmallPackage* SmallPackage* tools/ artifacts/ + +.DS_Store \ No newline at end of file diff --git a/source/Octodiff/CommandLine/HelpCommand.cs b/source/Octodiff/CommandLine/HelpCommand.cs index bd1f590..4464598 100644 --- a/source/Octodiff/CommandLine/HelpCommand.cs +++ b/source/Octodiff/CommandLine/HelpCommand.cs @@ -18,9 +18,9 @@ public void GetHelp(TextWriter writer) public int Execute(string[] commandLineArguments) { #if NET40 - var executable = Path.GetFileNameWithoutExtension(new Uri(typeof(HelpCommand).Assembly.CodeBase).LocalPath); + var executable = Path.GetFileNameWithoutExtension(new Uri(typeof(HelpCommand).Assembly.Codebase).LocalPath); #else - var executable = Path.GetFileNameWithoutExtension(new Uri(typeof(HelpCommand).GetTypeInfo().Assembly.CodeBase).LocalPath); + var executable = Path.GetFileNameWithoutExtension(new Uri(typeof(HelpCommand).GetTypeInfo().Assembly.Location).LocalPath); #endif var commandName = commandLineArguments.FirstOrDefault(); diff --git a/source/Octodiff/Octodiff.csproj b/source/Octodiff/Octodiff.csproj index 64e65fa..79e1bee 100644 --- a/source/Octodiff/Octodiff.csproj +++ b/source/Octodiff/Octodiff.csproj @@ -1,7 +1,7 @@ - netstandard2.0;net462 + netstandard2.0;net462;net8.0 true Octodiff Octopus.Octodiff @@ -22,10 +22,11 @@ - + Exe anycpu - - + + + \ No newline at end of file