Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

"Must provide a protected or public IntPtr ctor" errors in Mono 4.0.1

Discussion in 'Editor & General Support' started by Xaon, Nov 20, 2013.

  1. Xaon

    Xaon

    Joined:
    Feb 28, 2013
    Posts:
    62
    After upgrading Unity3D to 4.3 in new MonoDevelop I often saw error about MissingIntPtrCtorException. Suggested solution I've found was add a MissingIntPtrCtorException class.
    Code (csharp):
    1.  
    2. // MissingIntPtrCtorException.cs : Exception for missing IntPtr ctors
    3. //
    4. // Authors: Mike Kestner <mkestner@ximian.com>
    5. //
    6. // (legal stuff)
    7.  
    8. namespace GLib {
    9.    
    10.     using System;
    11.    
    12.     public class MissingIntPtrCtorException : Exception
    13.     {
    14.         public MissingIntPtrCtorException (string msg) : base (msg)
    15.         {
    16.         }
    17.        
    18.     }
    19. }
    Now I have errors like:
    The "MonoDevelop.SourceEditor.ExtensibleTextEditor" part changes. Always there is at least one following error of the same type which refers to different Editor.

    I've reinstalled Unity3D, removed Library folder and all sln files (the last was stupid and I've restored those files).

    The only things I've found are:
    "It's caused by monodevelop not destroying the file dialog
    properly and gtk# 2.10.1 being a bit more strict and correct with such
    things than previous versions."
    and
    "This issue should be solved with monodevelop 0.14, the packages are
    waiting for the Mono.Addins 0.2 release though."
    which aren't very helpful for me.

    Do someone know how to solve this problem? I would be grateful for any help.
     
  2. jayw

    jayw

    Joined:
    Aug 8, 2012
    Posts:
    7
    Did you have any luck with solving this? I am having the same issues with
    Code (csharp):
    1. MissingIntPtrCtorException
    . Monodevelop 4.0.1.

    $2014-04-19 13_28_57-New Tab.png
     
  3. Xaon

    Xaon

    Joined:
    Feb 28, 2013
    Posts:
    62