diff --git a/src/XMakeBuildEngine/Utilities/RegistryKeyWrapper.cs b/src/XMakeBuildEngine/Utilities/RegistryKeyWrapper.cs index a062fd683c8..d7d9559d59f 100644 --- a/src/XMakeBuildEngine/Utilities/RegistryKeyWrapper.cs +++ b/src/XMakeBuildEngine/Utilities/RegistryKeyWrapper.cs @@ -226,6 +226,7 @@ private RegistryKey WrappedKey if (ExceptionHandling.NotExpectedRegistryException(ex)) throw; + _attemptedToOpenRegistryKey = true; throw new RegistryException(ex.Message, Name, ex); } finally