universal-tools / UTNotificationsFeedback

7 stars 0 forks source link

1.7.3 Win32.RegistryKey error #87

Open keyface opened 6 years ago

keyface commented 6 years ago

Using the plugin with the unity editor for windows produces the following error;

Assets/UTNotifications/Src/Settings.cs(1291,64): error CS1070: The type Microsoft.Win32.RegistryKey' has been forwarded to an assembly that is not referenced. Consider adding a reference to assembly Microsoft.Win32.Registry, Version=4.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'

We can fix this by setting the Api Compatibility Level to .Net 4.x instead of .Net Standard 2.0 but its not ideal.

For now I've commented out the fallback to CheckForJavaHome after GetEnvironmentVariable("JAVA_HOME") in Settings.cs

yuriy-universal-ivanov commented 6 years ago

Hi @keyface ,

Thanks for letting me know. It's not reproduced for me even with .Net 2, so I should be missing something. Could you please tell me your versions of Windows and Unity and what target platform is chosen when the issue occurs?

Thank you a lot for your assistance on this and sorry for any inconvenience, Best regards, Yuriy, Universal Tools team.

yuriy-universal-ivanov commented 5 years ago

Hi @keyface ,

We found a way to reproduce the issue. It happens when Scripting Runtime Version is set to 4.x and Api Compatibility Level is 2.0. Please find attached a fixed version of Settings.cs (the fallback code is removed from it, but it tries using keytool from PATH if JAVA_HOME is not defined). Settings.zip