System.InvalidOperationException when calling valueOf on any enum class

Matt Bastress <[email protected]>
Newsgroups gmane.comp.java.ikvm.devel
Message-ID <CACpaFyvEX70j3O+W4fL-obwpHk4eZ3aOtkmPuh5ZWcCVji_zZA@mail.gmail.com>
Hi,

When using MyEnum.valueOf(String) to create an enum instance, after using
ikvmc to create a DLL and running on the Windows 8.1 platform, I get a
System.InvalidOperationException and a message, "The API
'System.Exception.get_TargetSite()' cannot be used on the current platform.
See http://go.microsoft.com/fwlink/?LinkId=248273 for more information."
This is the stack trace:

   at
System.Reflection.Emit.DynamicILGenerator.GetTokenFor(RuntimeMethodInfo
rtMeth)
   at System.Reflection.Emit.DynamicILGenerator.Emit(OpCode opcode,
MethodInfo meth)
   at IKVM.Internal.CodeEmitter.RealEmitOpCode(OpCode opcode, Object arg)
   at IKVM.Internal.CodeEmitter.OpCodeWrapper.RealEmit(Int32 ilOffset,
CodeEmitter codeEmitter, Int32& lineNumber)
   at IKVM.Internal.CodeEmitter.DoEmit()
   at
IKVM.NativeCode.sun.reflect.ReflectionFactory.FastMethodAccessorImpl..ctor(Method
method, Boolean nonvirtual)
   at
IKVM.NativeCode.sun.reflect.ReflectionFactory.newMethodAccessor(Object
thisFactory, Object method)
   at sun.reflect.ReflectionFactory.newMethodAccessor(Method m)
   at java.lang.reflect.Method.acquireMethodAccessor()
   at java.lang.reflect.Method.invoke(Object obj, Object[] args, CallerID )
   at java.lang.Class.getEnumConstantsShared()
   at java.lang.Class.enumConstantDirectory()
   at java.lang.Enum.valueOf(Class enumType, String name)
   at
com.casenet.external.portable.common.configuration.AttributeType.valueOf(String
name)

Thanks for any help.

------------------------------------------------------------------------------
WatchGuard Dimension instantly turns raw network data into actionable 
security intelligence. It gives you real-time visual feedback on key
security issues and trends.  Skip the complicated setup - simply import
a virtual appliance and go from zero to informed in seconds.
http://pubads.g.doubleclick.net/gampad/clk?id=123612991&iu=/4140/ostg.clktrk

_______________________________________________
Ikvm-developers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ikvm-developers
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.