title: Xamarin macOs CreateBookmarkData WithSecurityScope results in The file couldn’t be opened
body: <p>This code used to work, but after installing Visual Studio for Mac 2022 it doesn't work anymore:</p>
  <pre><code>                var dlg = NSOpenPanel.OpenPanel;
                  dlg.AllowsMultipleSelection = false;
                  dlg.CanChooseFiles = false;
                  dlg.CanChooseDirectories = true;
  
                  if (dlg.RunModal() == 1)
                  {
                      if (dlg.Url != null)
                      {
                          NSError error = new NSError();
                          string[] resourceValues = {  };
                          var data = dlg.Url.CreateBookmarkData(NSUrlBookmarkCreationOptions.WithSecurityScope, resourceValues, null, out error);
                          var userDefaults = NSUserDefaults.StandardUserDefaults;
                          userDefaults.SetValueForKey(data, new NSString(&quot;MBVFolderBookmark&quot;));
  
                      }
                  }
  </code></pre>
  <p>The error parameter is {The file couldn’t be opened.}
  The same error show with files or folders.</p>
  <p>Other options of NSUrlBookmarkCreationOptions still works.</p>
  <p>What can it be?</p>