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] <support@github.com>

* Update Program.cs

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Next Turn <45985406+NextTurn@users.noreply.github.com>
pull/714/head
dependabot[bot] 2020-11-12 13:41:41 +08:00 committed by GitHub
parent 5a61df61e3
commit d46a4331d8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 4 deletions

View File

@ -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>

View File

@ -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)