diff --git a/src/VisualStudio/Core/Def/Implementation/Options/RoamingVisualStudioProfileOptionPersister.cs b/src/VisualStudio/Core/Def/Implementation/Options/RoamingVisualStudioProfileOptionPersister.cs index 475b36ab5c7eccc4634d5dc4847afc3fd3bb8515..09026c06faad8a5e838bb771d64ce191b7e9b349 100644 --- a/src/VisualStudio/Core/Def/Implementation/Options/RoamingVisualStudioProfileOptionPersister.cs +++ b/src/VisualStudio/Core/Def/Implementation/Options/RoamingVisualStudioProfileOptionPersister.cs @@ -174,6 +174,11 @@ public bool TryFetch(OptionKey optionKey, out object value) value = longValue != 0; return true; } + else if (optionKey.Option.Type == typeof(bool?)) + { + // when nullable type is assigned to object, it can lose nullable type. + return (value is bool) || (value == null); + } else if (value != null && optionKey.Option.Type != value.GetType()) { // We got something back different than we expected, so fail to deserialize