From 353df967c6e18467dd592c78cb638542d71db8b7 Mon Sep 17 00:00:00 2001
From: Tyrrrz <1935960+Tyrrrz@users.noreply.github.com>
Date: Mon, 20 May 2024 18:02:57 +0300
Subject: [PATCH] Update NuGet packages
---
...tnetRuntimeBootstrapper.AppHost.Cli.csproj | 4 +--
.../BootstrapperBase.cs | 12 ++++----
.../Dotnet/DotnetHost.cs | 12 ++++----
...netRuntimeBootstrapper.AppHost.Core.csproj | 4 +--
.../DotnetRuntimePrerequisite.cs | 30 +++++++++----------
.../WindowsUpdate3063858Prerequisite.cs | 11 ++++---
.../TargetAssembly.cs | 9 +++---
...tnetRuntimeBootstrapper.AppHost.Gui.csproj | 4 +--
.../DotnetRuntimeBootstrapper.Demo.Cli.csproj | 2 +-
.../DotnetRuntimeBootstrapper.Demo.Gui.csproj | 2 +-
DotnetRuntimeBootstrapper/BootstrapperTask.cs | 26 +++++++---------
.../DotnetRuntimeBootstrapper.csproj | 8 ++---
12 files changed, 57 insertions(+), 67 deletions(-)
diff --git a/DotnetRuntimeBootstrapper.AppHost.Cli/DotnetRuntimeBootstrapper.AppHost.Cli.csproj b/DotnetRuntimeBootstrapper.AppHost.Cli/DotnetRuntimeBootstrapper.AppHost.Cli.csproj
index c3e39b1..5dc574e 100644
--- a/DotnetRuntimeBootstrapper.AppHost.Cli/DotnetRuntimeBootstrapper.AppHost.Cli.csproj
+++ b/DotnetRuntimeBootstrapper.AppHost.Cli/DotnetRuntimeBootstrapper.AppHost.Cli.csproj
@@ -12,8 +12,8 @@
-
-
+
+
diff --git a/DotnetRuntimeBootstrapper.AppHost.Core/BootstrapperBase.cs b/DotnetRuntimeBootstrapper.AppHost.Core/BootstrapperBase.cs
index ee8f508..f485043 100644
--- a/DotnetRuntimeBootstrapper.AppHost.Core/BootstrapperBase.cs
+++ b/DotnetRuntimeBootstrapper.AppHost.Core/BootstrapperBase.cs
@@ -58,13 +58,13 @@ private void HandleException(Exception exception)
.Version.ToString(3);
var content = $"""
- Description: Bootstrapper for a .NET application has failed.
- Application: {applicationName}
- Path: {applicationFilePath}
- AppHost: .NET Runtime Bootstrapper v{bootstrapperVersion}
+ Description: Bootstrapper for a .NET application has failed.
+ Application: {applicationName}
+ Path: {applicationFilePath}
+ AppHost: .NET Runtime Bootstrapper v{bootstrapperVersion}
- {exception}
- """;
+ {exception}
+ """;
EventLog.WriteEntry(".NET Runtime", content, EventLogEntryType.Error, 1023);
}
diff --git a/DotnetRuntimeBootstrapper.AppHost.Core/Dotnet/DotnetHost.cs b/DotnetRuntimeBootstrapper.AppHost.Core/Dotnet/DotnetHost.cs
index 28fa0ce..08b0d8c 100644
--- a/DotnetRuntimeBootstrapper.AppHost.Core/Dotnet/DotnetHost.cs
+++ b/DotnetRuntimeBootstrapper.AppHost.Core/Dotnet/DotnetHost.cs
@@ -72,12 +72,12 @@ private nint Initialize(string targetFilePath, string[] args)
throw new BootstrapperException(
$"""
- Failed to initialize .NET host.
- - Target: {targetFilePath}
- - Arguments: [{string.Join(", ", args)}]
- - Status: {status}
- - Error: {error}
- """
+ Failed to initialize .NET host.
+ - Target: {targetFilePath}
+ - Arguments: [{string.Join(", ", args)}]
+ - Status: {status}
+ - Error: {error}
+ """
);
}
diff --git a/DotnetRuntimeBootstrapper.AppHost.Core/DotnetRuntimeBootstrapper.AppHost.Core.csproj b/DotnetRuntimeBootstrapper.AppHost.Core/DotnetRuntimeBootstrapper.AppHost.Core.csproj
index b8a43ef..d2338e5 100644
--- a/DotnetRuntimeBootstrapper.AppHost.Core/DotnetRuntimeBootstrapper.AppHost.Core.csproj
+++ b/DotnetRuntimeBootstrapper.AppHost.Core/DotnetRuntimeBootstrapper.AppHost.Core.csproj
@@ -5,8 +5,8 @@
-
-
+
+
diff --git a/DotnetRuntimeBootstrapper.AppHost.Core/Prerequisites/DotnetRuntimePrerequisite.cs b/DotnetRuntimeBootstrapper.AppHost.Core/Prerequisites/DotnetRuntimePrerequisite.cs
index 15a4d55..fe93a21 100644
--- a/DotnetRuntimeBootstrapper.AppHost.Core/Prerequisites/DotnetRuntimePrerequisite.cs
+++ b/DotnetRuntimeBootstrapper.AppHost.Core/Prerequisites/DotnetRuntimePrerequisite.cs
@@ -44,8 +44,8 @@ private string GetInstallerDownloadUrl()
// Find the installer download URL applicable for the current system
return Json
- // Find the list of files for the latest release
- .TryParse(manifest)
+ // Find the list of files for the latest release
+ .TryParse(manifest)
?.TryGetChild("releases")
?.TryGetChild(0)
?.TryGetChild(
@@ -59,22 +59,20 @@ runtime switch
?.TryGetChild("files")
?.EnumerateChildren()
// Filter by processor architecture
- .Where(
- f =>
- string.Equals(
- f.TryGetChild("rid")?.TryGetString(),
- "win-" + OperatingSystemEx.ProcessorArchitecture.GetMoniker(),
- StringComparison.OrdinalIgnoreCase
- )
+ .Where(f =>
+ string.Equals(
+ f.TryGetChild("rid")?.TryGetString(),
+ "win-" + OperatingSystemEx.ProcessorArchitecture.GetMoniker(),
+ StringComparison.OrdinalIgnoreCase
+ )
)
// Filter by file type
- .Where(
- f =>
- string.Equals(
- f.TryGetChild("name")?.TryGetString()?.Pipe(Path.GetExtension),
- ".exe",
- StringComparison.OrdinalIgnoreCase
- )
+ .Where(f =>
+ string.Equals(
+ f.TryGetChild("name")?.TryGetString()?.Pipe(Path.GetExtension),
+ ".exe",
+ StringComparison.OrdinalIgnoreCase
+ )
)
.Select(f => f.TryGetChild("url")?.TryGetString())
.FirstOrDefault()
diff --git a/DotnetRuntimeBootstrapper.AppHost.Core/Prerequisites/WindowsUpdate3063858Prerequisite.cs b/DotnetRuntimeBootstrapper.AppHost.Core/Prerequisites/WindowsUpdate3063858Prerequisite.cs
index 8ae61e7..af1f5bc 100644
--- a/DotnetRuntimeBootstrapper.AppHost.Core/Prerequisites/WindowsUpdate3063858Prerequisite.cs
+++ b/DotnetRuntimeBootstrapper.AppHost.Core/Prerequisites/WindowsUpdate3063858Prerequisite.cs
@@ -16,12 +16,11 @@ internal class WindowsUpdate3063858Prerequisite : IPrerequisite
OperatingSystemEx.Version >= OperatingSystemVersion.Windows8
|| OperatingSystemEx
.GetInstalledUpdates()
- .Any(
- u =>
- string.Equals(u, Id, StringComparison.OrdinalIgnoreCase)
- ||
- // Supersession (https://github.com/Tyrrrz/LightBulb/issues/209)
- string.Equals(u, "KB3068708", StringComparison.OrdinalIgnoreCase)
+ .Any(u =>
+ string.Equals(u, Id, StringComparison.OrdinalIgnoreCase)
+ ||
+ // Supersession (https://github.com/Tyrrrz/LightBulb/issues/209)
+ string.Equals(u, "KB3068708", StringComparison.OrdinalIgnoreCase)
);
private string GetInstallerDownloadUrl()
diff --git a/DotnetRuntimeBootstrapper.AppHost.Core/TargetAssembly.cs b/DotnetRuntimeBootstrapper.AppHost.Core/TargetAssembly.cs
index 751d251..5bcccf8 100644
--- a/DotnetRuntimeBootstrapper.AppHost.Core/TargetAssembly.cs
+++ b/DotnetRuntimeBootstrapper.AppHost.Core/TargetAssembly.cs
@@ -29,11 +29,10 @@ private DotnetRuntime[] GetRuntimes()
// If the app targets .NET 5 desktop and .NET 6 base,
// we still need to keep the base.
// Very unlikely that such a situation will happen though.
- runtimes.RemoveAll(
- r =>
- r.IsBase
- && r.Version.Major == desktopRuntime.Version.Major
- && r.Version <= desktopRuntime.Version
+ runtimes.RemoveAll(r =>
+ r.IsBase
+ && r.Version.Major == desktopRuntime.Version.Major
+ && r.Version <= desktopRuntime.Version
);
}
}
diff --git a/DotnetRuntimeBootstrapper.AppHost.Gui/DotnetRuntimeBootstrapper.AppHost.Gui.csproj b/DotnetRuntimeBootstrapper.AppHost.Gui/DotnetRuntimeBootstrapper.AppHost.Gui.csproj
index 89a68dd..83c4444 100644
--- a/DotnetRuntimeBootstrapper.AppHost.Gui/DotnetRuntimeBootstrapper.AppHost.Gui.csproj
+++ b/DotnetRuntimeBootstrapper.AppHost.Gui/DotnetRuntimeBootstrapper.AppHost.Gui.csproj
@@ -13,8 +13,8 @@
-
-
+
+
diff --git a/DotnetRuntimeBootstrapper.Demo.Cli/DotnetRuntimeBootstrapper.Demo.Cli.csproj b/DotnetRuntimeBootstrapper.Demo.Cli/DotnetRuntimeBootstrapper.Demo.Cli.csproj
index 0adf7ce..cad552d 100644
--- a/DotnetRuntimeBootstrapper.Demo.Cli/DotnetRuntimeBootstrapper.Demo.Cli.csproj
+++ b/DotnetRuntimeBootstrapper.Demo.Cli/DotnetRuntimeBootstrapper.Demo.Cli.csproj
@@ -14,7 +14,7 @@
-
+
diff --git a/DotnetRuntimeBootstrapper.Demo.Gui/DotnetRuntimeBootstrapper.Demo.Gui.csproj b/DotnetRuntimeBootstrapper.Demo.Gui/DotnetRuntimeBootstrapper.Demo.Gui.csproj
index 36cec0c..7c5bf09 100644
--- a/DotnetRuntimeBootstrapper.Demo.Gui/DotnetRuntimeBootstrapper.Demo.Gui.csproj
+++ b/DotnetRuntimeBootstrapper.Demo.Gui/DotnetRuntimeBootstrapper.Demo.Gui.csproj
@@ -16,7 +16,7 @@
-
+
diff --git a/DotnetRuntimeBootstrapper/BootstrapperTask.cs b/DotnetRuntimeBootstrapper/BootstrapperTask.cs
index 9de1c82..6f41c9a 100644
--- a/DotnetRuntimeBootstrapper/BootstrapperTask.cs
+++ b/DotnetRuntimeBootstrapper/BootstrapperTask.cs
@@ -80,13 +80,8 @@ private void InjectConfiguration()
new ReaderParameters { ReadWrite = true }
);
- assembly.MainModule.Resources.RemoveAll(
- r =>
- string.Equals(
- r.Name,
- "BootstrapperConfiguration",
- StringComparison.OrdinalIgnoreCase
- )
+ assembly.MainModule.Resources.RemoveAll(r =>
+ string.Equals(r.Name, "BootstrapperConfiguration", StringComparison.OrdinalIgnoreCase)
);
assembly.MainModule.Resources.Add(
@@ -121,15 +116,14 @@ private void InjectResources()
}
// Modify the version info resource
- targetPortableExecutable.SetVersionInfo(
- v =>
- v.SetFileType(FileType.Application)
- .SetAttribute(VersionAttributeName.InternalName, AppHostFileName)
- .SetAttribute(VersionAttributeName.OriginalFilename, AppHostFileName)
- .SetAttribute(
- "AppHost",
- $".NET Runtime Bootstrapper v{Version.ToString(3)} ({Variant})"
- )
+ targetPortableExecutable.SetVersionInfo(v =>
+ v.SetFileType(FileType.Application)
+ .SetAttribute(VersionAttributeName.InternalName, AppHostFileName)
+ .SetAttribute(VersionAttributeName.OriginalFilename, AppHostFileName)
+ .SetAttribute(
+ "AppHost",
+ $".NET Runtime Bootstrapper v{Version.ToString(3)} ({Variant})"
+ )
);
Log.LogMessage("Injected resources into '{0}'.", AppHostFileName);
diff --git a/DotnetRuntimeBootstrapper/DotnetRuntimeBootstrapper.csproj b/DotnetRuntimeBootstrapper/DotnetRuntimeBootstrapper.csproj
index cf5a8fc..7c052a9 100644
--- a/DotnetRuntimeBootstrapper/DotnetRuntimeBootstrapper.csproj
+++ b/DotnetRuntimeBootstrapper/DotnetRuntimeBootstrapper.csproj
@@ -27,11 +27,11 @@
-
-
-
+
+
+
-
+