diff --git a/Xamarin.MacDev/AppleSdkSettings.cs b/Xamarin.MacDev/AppleSdkSettings.cs index 749a0f0..8262df3 100644 --- a/Xamarin.MacDev/AppleSdkSettings.cs +++ b/Xamarin.MacDev/AppleSdkSettings.cs @@ -28,6 +28,7 @@ using System.ComponentModel; using System.Diagnostics; using System.IO; +using System.Linq; // Disable until we get around to enable + fix any issues. #nullable disable @@ -142,6 +143,10 @@ static AppleSdkSettings () break; } + // If no existing settings file was found, default to the first candidate path. + if (SettingsPath is null) + SettingsPath = XcodeLocator.SettingsPathCandidates.First (); + Directory.CreateDirectory (Path.GetDirectoryName (SettingsPath)); Init ();