Browse Source

Bump Microsoft.Win32.Registry from 4.7.0 to 5.0.0 (#706)

* Bump Microsoft.Win32.Registry from 4.7.0 to 5.0.0

Bumps [Microsoft.Win32.Registry](https://github.com/dotnet/runtime) from 4.7.0 to 5.0.0.
- [Release notes](https://github.com/dotnet/runtime/releases)
- [Commits](https://github.com/dotnet/runtime/commits)

Signed-off-by: dependabot[bot] <[email protected]>

* Update Program.cs

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Next Turn <[email protected]>
dependabot[bot] 5 years ago
parent
commit
d46a4331d8
2 changed files with 4 additions and 4 deletions
  1. 1 1
      src/WinSW.Core/WinSW.Core.csproj
  2. 3 3
      src/WinSW/Program.cs

+ 1 - 1
src/WinSW.Core/WinSW.Core.csproj

@@ -16,7 +16,7 @@
   </ItemGroup>
 
   <ItemGroup Condition="'$(TargetFramework)' == 'net5.0-windows'">
-    <PackageReference Include="Microsoft.Win32.Registry" Version="4.7.0" />
+    <PackageReference Include="Microsoft.Win32.Registry" Version="5.0.0" />
     <PackageReference Include="System.Diagnostics.EventLog" Version="4.7.0" />
     <PackageReference Include="System.Security.AccessControl" Version="5.0.0" />
   </ItemGroup>

+ 3 - 3
src/WinSW/Program.cs

@@ -1055,9 +1055,9 @@ namespace WinSW
                 DateTime fileLastWriteTime = File.GetLastWriteTime(config.FullPath);
 
                 using RegistryKey? registryKey = Registry.LocalMachine
-                    .OpenSubKey("SYSTEM")
-                    .OpenSubKey("CurrentControlSet")
-                    .OpenSubKey("Services")
+                    .OpenSubKey("SYSTEM")?
+                    .OpenSubKey("CurrentControlSet")?
+                    .OpenSubKey("Services")?
                     .OpenSubKey(config.Name);
 
                 if (registryKey is null)