Notice (2018-05-24): bugzilla.xamarin.com is now in
Please join us on
Visual Studio Developer Community and in the
Mono organizations on
GitHub to continue tracking issues. Bugzilla will remain
available for reference in read-only mode. We will continue to work
on open Bugzilla bugs, copy them to the new locations
as needed for follow-up, and add the new items under Related
Our sincere thanks to everyone who has contributed on this bug
tracker over the years. Thanks also for your understanding as we
make these adjustments and improvements for the future.
Please create a new report on
GitHub or Developer Community with
your current version information, steps to reproduce, and relevant error
messages or log files if you are hitting an issue that looks similar to
this resolved bug and you do not yet see a matching new report.
The following method in the UnixRegistryApi class doesn't support ulong, ushort, bool, etc, when saving data to the registry.
public void SetValue (string name, object value, RegistryValueKind valueKind)
The following code works properly under .NET in windows:
internal static void SetRegistryValue<T>(RegistryKey regKey, Type propertyType,
string propertyName, T propertyValue)
if (propertyType == typeof(long) || propertyType == typeof(ulong))
regKey.SetValue(propertyName, Convert.ToInt64(propertyValue, CultureInfo.InvariantCulture), RegistryValueKind.QWord);
else if (propertyType == typeof(bool) ||
propertyType == typeof(byte) ||
propertyType == typeof(sbyte) ||
propertyType == typeof(short) ||
propertyType == typeof(ushort) ||
propertyType == typeof(int) ||
propertyType == typeof(uint))
regKey.SetValue(propertyName, propertyValue, RegistryValueKind.DWord);
if (propertyValue == null)
Note the property type of bool being set in the registry as a DWORD. Also, looking at the code, the QWORD in the UnixRegistryApi doesn't support unsigned longs.
I noticed that the bool type will still fail when using a DWORD
Can you test again, there was a separate fix that took care o f other cases.
Already fixed in master