I have Xamarin.MAC native application built with C# language. Since the Xamarin support is stopped, I have to migrate it to .Net MAC OS. But I am not seeing the AppKit.Window in the .Net MAC OS. In Xamarin , I can see an option to create window controller, but in .net MAC OS, I can see only option to create View and view controller. Do you know why? How Can I convert my existing window and window controllers? I have copied my existing window and window controller to .Net MAC Os project, but when I open the window controller using the below code, I am getting the following error. Do you know why and how can I solve this issue?
homeWindowController = new HomeWindowController ();
CommonClass.HomeController = homeWindowController;
homeWindowController.Window.MakeKeyAndOrderFront (this);
Following are the error details.
Argue-4000"Objective-C exception thrown. Name: NSInternalInconsistencyException Reason: initWithWindowRef: is not currently supported for NSWindow subclasses!\nNative stack trace:\n\t0 CoreFoundation 0x000000018477c570 __exceptionPreprocess + 176\n\t1 libobjc.A.dylib 0x000000018426deb4 objc_exception_throw + 60\n\t2 CoreFoundation 0x000000018477c460 +[NSException exceptionWithName:reason:userInfo:] + 0\n\t3 AppKit 0x0000000188991398 -[NSWindow(NSCarbonExtensions) initWithWindowRef:]
net8.0-macos
workload and works fine. Can you please provide more details about your code?