From b7cf736a3702355f02e5939acea0a7824490df8d Mon Sep 17 00:00:00 2001 From: Damian Hickey <57436+damianh@users.noreply.github.com> Date: Fri, 12 Dec 2025 10:47:24 +0100 Subject: [PATCH] Template build program targets net10.0 --- templates/build/Program.cs | 6 +++--- templates/build/build.csproj | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/templates/build/Program.cs b/templates/build/Program.cs index 268619b6d..e67467e62 100644 --- a/templates/build/Program.cs +++ b/templates/build/Program.cs @@ -82,10 +82,10 @@ void CopyFile(DirectoryInfo directoryInfo, FileInfo fileInfo) bool TryFindFile(string fileName, [NotNullWhen(true)] out FileInfo? found) { + var executingAssemblyLocation = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location) + ?? throw new InvalidOperationException("Failed to find executing assembly location"); - - var currentDir = new DirectoryInfo(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location) - ?? throw new InvalidOperationException("Failed to find directory for current assembly")); + var currentDir = new DirectoryInfo(executingAssemblyLocation); while (currentDir != null && currentDir.Exists) { diff --git a/templates/build/build.csproj b/templates/build/build.csproj index fd4bd08da..ed9781c22 100644 --- a/templates/build/build.csproj +++ b/templates/build/build.csproj @@ -2,7 +2,7 @@ Exe - net9.0 + net10.0 enable enable