- Home /
The requested feature is not implemented
My team is currently developing across multiple development platforms. We are using some of our own assemblies with Unity, but our current version of the assembly references System.Web and System.Web.Services, which appear to be missing in the Mono Compatibility page.
The strange behavior comes from running on the Mac vs Windows. On the Mac and iPad, everything runs fine and everything compiles inside MonoDevelop without any problems. When I bring the project over to the PC, Unity won't load the .dll. It complains about some missing references (in an obscure way).
If I copy those referenced assemblies into the asset folder (System.Web, System.Web.Services) from the .NET 2.0 folder on Windows, those errors go away and Unity can play the scene. MonoDevelop, on the other hand, will not compile with those libraries in there and anytime I make a call into our custom .dll, I get a message saying:
Exception Caught: The requested feature is not implemented.
Now I understand this error is thrown because this subset of functionality is not available in older versions of Mono, but that doesn't explain why the Mac version works just fine, even without additional assemblies and without errors of any kind. I would assume that the mobile version of Mono would have even less functionality, but again, the iPad can make all of the calls just fine.
Answer by vrdave · Oct 13, 2011 at 09:01 PM
I seemed to have answered my own question after a couple hours of extended looking around.
You must first install a new version of Mono onto your machine (latest is fine, but you might want to grab an older version for Unity compatibility reasons, like 2.6.7)
I discovered that the default is set to Microsoft .NET for the runtime, and for whatever reason, it was causing the load failures. I switched the default to the Mono runtime and everything seems to be grooving now.
Under Tools -> Preferences, you will find the option for switching the runtime. Here's a quick image of what you are looking at/for:
Hey I tried these steps, but Unity still gives me this error:
NotImplementedException: The requested feature is not implemented. System.Runtime.InteropServices.$$anonymous$$arshal.ReadInt16 (System.Object ptr, Int32 ofs) (at /Applications/buildAgent/work/c514da0c8183631c/mcs/class/corlib/System.Runtime.InteropServices/$$anonymous$$arshal.cs:744) System.Drawing.Font.FromLogFont (System.Object lf, IntPtr hdc) System.Drawing.Font.FromHfont (IntPtr hfont) System.Drawing.SystemFonts.get_DefaultFont () System.Windows.Forms.Theme..ctor () System.Windows.Forms.ThemeWin32Classic..ctor () System.Windows.Forms.ThemeEngine..cctor () Rethrow as TypeInitializationException: An exception was thrown by the type initializer for System.Windows.Forms.ThemeEngine System.Windows.Forms.SystemInformation.get_$$anonymous$$enuAccess$$anonymous$$eysUnderlined () System.Windows.Forms.Control..ctor () (wrapper remoting-invoke-with-check) System.Windows.Forms.Control:.ctor () System.Windows.Forms.WindowsFormsSynchronizationContext..cctor () Rethrow as TypeInitializationException: An exception was thrown by the type initializer for System.Windows.Forms.WindowsFormsSynchronizationContext System.Windows.Forms.Control..ctor () System.Windows.Forms.ScrollableControl..ctor () System.Windows.Forms.ContainerControl..ctor () System.Windows.Forms.Form..ctor () System.Windows.Forms.CommonDialog+DialogForm..ctor (System.Windows.Forms.CommonDialog owner) (wrapper remoting-invoke-with-check) System.Windows.Forms.CommonDialog/DialogForm:.ctor (System.Windows.Forms.CommonDialog) System.Windows.Forms.FileDialog..ctor () System.Windows.Forms.OpenFileDialog..ctor () (wrapper remoting-invoke-with-check) System.Windows.Forms.OpenFileDialog:.ctor () SimulatorGUI.OpenPNG () (at Assets/SimulatorGUI.cs:62) SimulatorGUI.OnGUI () (at Assets/SimulatorGUI.cs:22)
You cannot use Windows.Forms inside Unity, or at least, shouldn't use Windows Forms. Can you explain what you are trying to do and maybe I can help you figure out another method.
It looks like you are trying to use the standard Windows File Open dialog? I would steer clear of OS specific libraries unless you only plan on ever releasing this for Windows. If you decide to go this route, you can pull the Windows.Forms.dll from "C:\Program Files (x86)\Unity\Editor\Data\$$anonymous$$ono\lib\mono\2.0" and it should be able to link that way, but that opens up a can of worms you may not be ready to deal with.
Yes I'm just trying to show the standard operating system open box. Just for windows. I tried putting that version of the Windows.Forms.dll and it says the same exception - that the feature is not implemented. I've currently tried mono 2.0, 3.5, 4.0, and 4.5 but they all give the same error message.
Have you tried the $$anonymous$$S version: "C:/Windows/$$anonymous$$icrosoft.NET/Framework/v2.0.50727/System.Windows.Forms.dll"?
Two other things to check: 1. The .dll was dropped in the Assets/plugins folder 2. You are using Unity Pro (the stack trace shows a marshalling call which I believe calls into managed C++, which requires Unity Pro)
There is also the problem of building, even if you get this working in the Editor. I have see similar posts reporting the inability to build with certain dlls in place.
If you want OS-like GUIs, you may look into using something like GT$$anonymous$$: http://www.mono-project.com/GtkSharp. There has been some success from people using this ins$$anonymous$$d of Windows.Forms.
Your answer
![](https://koobas.hobune.stream/wayback/20220613005427im_/https://answers.unity.com/themes/thub/images/avi.jpg)