Re: [Ikvm-developers] MonoDevelop: Could not resolve IKVM.Runtime
Brought to you by:
jfrijters
|
From: Steve H. <st...@we...> - 2011-01-20 20:18:22
|
Hi Jeroen,
See inline below:
On Wed, Jan 19, 2011 at 11:39 PM, Jeroen Frijters <je...@su...> wrote:
> Hi Steve,
>
> Do you mean the Windows GAC?
I'm on OS X. I used gacutil -i to install install one of them.. then used
the path that it reported for the gac and copied the rest into that
directory also. I was previously using the MONO_PATH environment variable
in my system to add the ikvm/bin directory, but that was giving me the
results I reported before.
> That isn't used by the Mono runtime, so that wouldn't help. When running
> your exe you can either set the MONO_PATH environment to point to the
> ikvm/bin directory or copy all the IKVM.*.dll files to the same directory as
> your .exe file.
>
As I am now able to run some of my code from the command line, it seems that
the problem may lie more in the arena of the MonoDevelop experts - as that
is where I'm getting no love :)
>
> Your Swing code would work on .NET, but probably not anywhere else.
>
Thanks for the clarification. Is AWT/Swing the only thing that runs on .NET
and not Mono, or are there other packages too?
Thanks again for your help.
-Steve
>
> Regards,
> Jeroen
>
> > -----Original Message-----
> > From: Steve Hannah [mailto:st...@we...]
> > Sent: Thursday, January 20, 2011 8:27 AM
> > To: Jeroen Frijters
> > Cc: ikv...@li...
> > Subject: Re: [Ikvm-developers] MonoDevelop: Could not resolve
> > IKVM.Runtime
> >
> > Hi Jeroen,
> >
> > Thanks for the reply. Your hint got me a step further. I added all of
> > the IKVM.* dll files to the mono gac and that caused MonoDevelop to
> > allow me to at least open the MyBean.dll and browse through its
> > contents.
> >
> > However when I try to run a simple app it gives me a similar message as
> > the first one except it complains now that it cannot find
> > IKVM.OpenJDK.Core (which is also in the GAC).
> >
> > I can't seem to find any other versions of IKVM anywhere on my computer
> > so I'm not sure exactly what is going on here. Likely I need to dig
> > into how Mono does its linking.
> >
> > On a side, perhaps related note, I am unable to get a simple Swing app
> > running. I know Swing is unsupported but the state of it as described
> > in the FAQ makes me think that the following level of Swing App should
> > work:
> >
> > import javax.swing.*;
> > class MyClass {
> > JFrame f = new JFrame("Hello");
> > f.setBounds(0,0,200,200);
> > f.setVisible(true);
> > }
> >
> > Should work. But I'm getting the following error when I try to run this
> > with ikvm:
> >
> > Exception in thread "AWT-EventQueue-0"
> > System.Reflection.TargetInvocationException: Exception has been thrown
> > by the target of an invocation. ---> System.NotImplementedException: The
> > requested feature is not implemented.
> > at System.Windows.Forms.XplatUICarbon.get_IconSize () [0x00000] in
> > <filename unknown>:0
> > at System.Windows.Forms.XplatUI.get_IconSize () [0x00000] in <filename
> > unknown>:0
> > at System.Windows.Forms.SystemInformation.get_IconSize () [0x00000] in
> > <filename unknown>:0
> > at ikvm.awt.NetWindowPeer+<>c__DisplayClass8.<updateIconImages>b__7 ()
> > [0x00000] in <filename unknown>:0
> > at ikvm.awt.NetToolkit.BeginInvoke (System.Threading.ThreadStart del)
> > [0x00000] in <filename unknown>:0
> > at ikvm.awt.NetWindowPeer.updateIconImages () [0x00000] in <filename
> > unknown>:0
> > at ikvm.awt.NetWindowPeer.initialize () [0x00000] in <filename
> > unknown>:0
> > at ikvm.awt.NetFramePeer.initialize () [0x00000] in <filename
> > unknown>:0
> > at ikvm.awt.NetComponentPeer..ctor (java.awt.Component target)
> > [0x00000] in <filename unknown>:0
> > at ikvm.awt.NetContainerPeer..ctor (java.awt.Container awtcontainer)
> > [0x00000] in <filename unknown>:0
> > at ikvm.awt.NetWindowPeer..ctor (java.awt.Window window) [0x00000] in
> > <filename unknown>:0
> > at ikvm.awt.NetFramePeer..ctor (java.awt.Frame frame) [0x00000] in
> > <filename unknown>:0
> > at ikvm.awt.NetToolkit+<>c__DisplayClass1.<createFrame>b__0 ()
> > [0x00000] in <filename unknown>:0
> > at (wrapper managed-to-native)
> > System.Reflection.MonoMethod:InternalInvoke
> > (System.Reflection.MonoMethod*,object,object[],System.Exception&)
> > at System.Reflection.MonoMethod.Invoke (System.Object obj,
> > BindingFlags invokeAttr, System.Reflection.Binder binder,
> > System.Object[] parameters, System.Globalization.CultureInfo culture)
> > [0x00000] in <filename unknown>:0
> >
> >
> > I get the feeling that these 2 problems are caused by the same thing.
> >
> > I've tried just about everything I can think of for trying to make mono
> > find my libraries, but I haven't had much success. The next step will
> > be to completely wipe Mono and IKVM from my computer and try installing
> > from scratch... but I'm hoping to find a more targeted solution before
> > that.
> >
> >
> > Thanks again for your help.
> >
> > Best regards
> >
> > Steve
> >
> > On Wed, Jan 19, 2011 at 9:48 PM, Jeroen Frijters <je...@su...>
> > wrote:
> >
> >
> > Hi Steve,
> >
> > It could be that you referenced a different version of
> > IKVM.Runtime.dll than the one used by MyBean.dll. Normally for .NET/Mono
> > to bind a strong named assembly the versions must match exactly.
> >
> > Your Mono version probably ships with an older version of IKVM than
> > 0.44.0.5, so try referencing the 0.44.0.5 version of the IKVM.*.dll
> > assemblies.
> >
> > Regards,
> > Jeroen
> >
> >
> > > -----Original Message-----
> > > From: Steve Hannah [mailto:st...@we...]
> > > Sent: Wednesday, January 19, 2011 10:10 PM
> > > To: ikv...@li...
> > > Subject: [Ikvm-developers] MonoDevelop: Could not resolve
> > IKVM.Runtime
> > >
> > > I'm a newbie to IKVM and Mono. I have converted one of my java
> > .jar
> > > files into a .net assembly using ikvmc, and I'm trying to add it
> > as a
> > > reference inside a MonoDevelop project. I'm able to add it as a
> > > reference, but when I try to double click on it (to make sure it
> > loaded
> > > it) in the "Solution" drawer, it gives me the following message:
> > >
> > > The file '/path/to/.../MyBean.dll' could not be opened . Could
> > not
> > > resolve: IKVM.Runtime, Version=0.44.0.5, Culture=neutral,
> > > PublicKeyToken=......
> > >
> > > This despite the fact that I have successfully added
> > IKVM.Runtime.dll in
> > > the references for my solution and am able to double click it to
> > browse
> > > its contents.
> > >
> > > I get this same message if I try to add any of the other IKVM
> > libraries
> > > including IKVM.OpenJDK.Core .
> > >
> > > Can anyone offer any suggestions on why I would be receiving this
> > > message?
> > >
> > > Thanks for your help
> > >
> > > Steve
> >
> >
>
>
|