Skip to content

Commit 9cfcc97

Browse files
committed
Update NuGet packages
1 parent 0e3c3a7 commit 9cfcc97

File tree

11 files changed

+49
-66
lines changed

11 files changed

+49
-66
lines changed

DotnetRuntimeBootstrapper.AppHost.Cli/Bootstrapper.cs

Lines changed: 9 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,9 @@ IPrerequisite[] missingPrerequisites
2424
{
2525
using (ConsoleEx.WithForegroundColor(ConsoleColor.DarkRed))
2626
{
27-
Console
28-
.Error
29-
.WriteLine(
30-
$"Your system is missing runtime components required by {targetAssembly.Name}:"
31-
);
27+
Console.Error.WriteLine(
28+
$"Your system is missing runtime components required by {targetAssembly.Name}:"
29+
);
3230

3331
foreach (var prerequisite in missingPrerequisites)
3432
Console.Error.WriteLine($" - {prerequisite.DisplayName}");
@@ -50,11 +48,9 @@ IPrerequisite[] missingPrerequisites
5048
// When not running in interactive mode, instruct the user to set the environment variable instead
5149
else
5250
{
53-
Console
54-
.Error
55-
.Write(
56-
"To install the missing components automatically, set the environment variable "
57-
);
51+
Console.Error.Write(
52+
"To install the missing components automatically, set the environment variable "
53+
);
5854

5955
using (ConsoleEx.WithForegroundColor(ConsoleColor.DarkCyan))
6056
Console.Error.Write(AcceptPromptEnvironmentVariable);
@@ -146,11 +142,9 @@ IPrerequisite[] missingPrerequisites
146142
if (isRebootRequired)
147143
{
148144
using (ConsoleEx.WithForegroundColor(ConsoleColor.DarkYellow))
149-
Console
150-
.Out
151-
.WriteLine(
152-
$"You need to restart Windows before you can run {targetAssembly.Name}."
153-
);
145+
Console.Out.WriteLine(
146+
$"You need to restart Windows before you can run {targetAssembly.Name}."
147+
);
154148

155149
// Only prompt for reboot if running in interactive mode
156150
if (ConsoleEx.IsInteractive)

DotnetRuntimeBootstrapper.AppHost.Cli/DotnetRuntimeBootstrapper.AppHost.Cli.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
</ItemGroup>
1313

1414
<ItemGroup>
15-
<PackageReference Include="CSharpier.MsBuild" Version="0.26.5" PrivateAssets="all" />
15+
<PackageReference Include="CSharpier.MsBuild" Version="0.26.7" PrivateAssets="all" />
1616
<PackageReference Include="PolyShim" Version="1.8.0" PrivateAssets="all" />
1717
<PackageReference Include="QuickJson" Version="1.1.0" PrivateAssets="all" />
1818
</ItemGroup>

DotnetRuntimeBootstrapper.AppHost.Core/BootstrapperBase.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,7 @@ private void HandleException(Exception exception)
5555
var bootstrapperVersion = Assembly
5656
.GetExecutingAssembly()
5757
.GetName()
58-
.Version
59-
.ToString(3);
58+
.Version.ToString(3);
6059

6160
var content = $"""
6261
Description: Bootstrapper for a .NET application has failed.

DotnetRuntimeBootstrapper.AppHost.Core/Dotnet/DotnetInstallation.cs

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -9,18 +9,16 @@ internal static class DotnetInstallation
99
{
1010
private static string? TryGetDirectoryPathFromRegistry()
1111
{
12-
var dotnetRegistryKey = Registry
13-
.LocalMachine
14-
.OpenSubKey(
15-
(
16-
OperatingSystemEx.ProcessorArchitecture.Is64Bit()
17-
? "SOFTWARE\\Wow6432Node\\"
18-
: "SOFTWARE\\"
19-
)
20-
+ "dotnet\\Setup\\InstalledVersions\\"
21-
+ OperatingSystemEx.ProcessorArchitecture.GetMoniker(),
22-
false
23-
);
12+
var dotnetRegistryKey = Registry.LocalMachine.OpenSubKey(
13+
(
14+
OperatingSystemEx.ProcessorArchitecture.Is64Bit()
15+
? "SOFTWARE\\Wow6432Node\\"
16+
: "SOFTWARE\\"
17+
)
18+
+ "dotnet\\Setup\\InstalledVersions\\"
19+
+ OperatingSystemEx.ProcessorArchitecture.GetMoniker(),
20+
false
21+
);
2422

2523
var dotnetDirPath = dotnetRegistryKey?.GetValue("InstallLocation", null) as string;
2624

DotnetRuntimeBootstrapper.AppHost.Core/DotnetRuntimeBootstrapper.AppHost.Core.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
</PropertyGroup>
66

77
<ItemGroup>
8-
<PackageReference Include="CSharpier.MsBuild" Version="0.26.5" PrivateAssets="all" />
8+
<PackageReference Include="CSharpier.MsBuild" Version="0.26.7" PrivateAssets="all" />
99
<PackageReference Include="PolyShim" Version="1.8.0" PrivateAssets="all" />
1010
<PackageReference Include="QuickJson" Version="1.1.0" PrivateAssets="all" />
1111
</ItemGroup>

DotnetRuntimeBootstrapper.AppHost.Core/Prerequisites/VisualCppPrerequisite.cs

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -11,17 +11,15 @@ internal class VisualCppPrerequisite : IPrerequisite
1111
public string DisplayName => "Visual C++ Redistributable 2015-2019";
1212

1313
public bool IsInstalled() =>
14-
Registry
15-
.LocalMachine
16-
.ContainsSubKey(
17-
(
18-
OperatingSystemEx.ProcessorArchitecture.Is64Bit()
19-
? "SOFTWARE\\Wow6432Node\\"
20-
: "SOFTWARE\\"
21-
)
22-
+ "Microsoft\\VisualStudio\\14.0\\VC\\Runtimes\\"
23-
+ OperatingSystemEx.ProcessorArchitecture.GetMoniker()
24-
);
14+
Registry.LocalMachine.ContainsSubKey(
15+
(
16+
OperatingSystemEx.ProcessorArchitecture.Is64Bit()
17+
? "SOFTWARE\\Wow6432Node\\"
18+
: "SOFTWARE\\"
19+
)
20+
+ "Microsoft\\VisualStudio\\14.0\\VC\\Runtimes\\"
21+
+ OperatingSystemEx.ProcessorArchitecture.GetMoniker()
22+
);
2523

2624
public IPrerequisiteInstaller DownloadInstaller(Action<double>? handleProgress)
2725
{

DotnetRuntimeBootstrapper.AppHost.Gui/DotnetRuntimeBootstrapper.AppHost.Gui.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
</ItemGroup>
1414

1515
<ItemGroup>
16-
<PackageReference Include="CSharpier.MsBuild" Version="0.26.5" PrivateAssets="all" />
16+
<PackageReference Include="CSharpier.MsBuild" Version="0.26.7" PrivateAssets="all" />
1717
<PackageReference Include="PolyShim" Version="1.8.0" PrivateAssets="all" />
1818
<PackageReference Include="QuickJson" Version="1.1.0" PrivateAssets="all" />
1919
</ItemGroup>

DotnetRuntimeBootstrapper.Demo.Cli/DotnetRuntimeBootstrapper.Demo.Cli.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
</PropertyGroup>
1515

1616
<ItemGroup>
17-
<PackageReference Include="CSharpier.MsBuild" Version="0.26.5" PrivateAssets="all" />
17+
<PackageReference Include="CSharpier.MsBuild" Version="0.26.7" PrivateAssets="all" />
1818
</ItemGroup>
1919

2020
<ItemGroup>

DotnetRuntimeBootstrapper.Demo.Gui/DotnetRuntimeBootstrapper.Demo.Gui.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
</PropertyGroup>
1717

1818
<ItemGroup>
19-
<PackageReference Include="CSharpier.MsBuild" Version="0.26.5" PrivateAssets="all" />
19+
<PackageReference Include="CSharpier.MsBuild" Version="0.26.7" PrivateAssets="all" />
2020
</ItemGroup>
2121

2222
<ItemGroup>

DotnetRuntimeBootstrapper/BootstrapperTask.cs

Lines changed: 14 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -72,28 +72,22 @@ private void InjectConfiguration()
7272
new ReaderParameters { ReadWrite = true }
7373
);
7474

75-
assembly
76-
.MainModule
77-
.Resources
78-
.RemoveAll(
79-
r =>
80-
string.Equals(
81-
r.Name,
82-
"BootstrapperConfiguration",
83-
StringComparison.OrdinalIgnoreCase
84-
)
85-
);
86-
87-
assembly
88-
.MainModule
89-
.Resources
90-
.Add(
91-
new EmbeddedResource(
75+
assembly.MainModule.Resources.RemoveAll(
76+
r =>
77+
string.Equals(
78+
r.Name,
9279
"BootstrapperConfiguration",
93-
ManifestResourceAttributes.Public,
94-
Encoding.UTF8.GetBytes(configuration)
80+
StringComparison.OrdinalIgnoreCase
9581
)
96-
);
82+
);
83+
84+
assembly.MainModule.Resources.Add(
85+
new EmbeddedResource(
86+
"BootstrapperConfiguration",
87+
ManifestResourceAttributes.Public,
88+
Encoding.UTF8.GetBytes(configuration)
89+
)
90+
);
9791

9892
assembly.Write();
9993

0 commit comments

Comments
 (0)