Simple fix, the new project was targeting .NET 4.0 Client. Switching to 3.5
solved the issues.

On Thu, Apr 22, 2010 at 10:37 PM, Joerthan Panest <joerthan.pan...@gmail.com
> wrote:

> Hello, I have successfully built ClojureCLR and run the main REPL
> successfully.
>
> Now, I would like to set up a project that uses ClojureCLR. So, I
> followed the short tutorial at:
> http://www.genericerror.com/blog/2010/01/22/SimpleClojureCLRExample.aspx
>
> At the first call of RT.LoadScript(...) I am getting an exception of:
>
> -----------------------------------------------------------------------------------------------
>
> -----------------------------------------------------------------------------------------------
> System.TypeInitializationException was unhandled
>  Message=The type initializer for 'clojure.lang.RT' threw an
> exception.
>  Source=Clojure
>  TypeName=clojure.lang.RT
>  StackTrace:
>       at clojure.lang.RT.LoadScript(FileInfo cljInfo)
>       at ClojureInteropTest.Program.Main(String[] args) in
> ClojureInteropTest\ClojureInteropTest\Program.cs:line 39
>       at System.AppDomain._nExecuteAssembly(RuntimeAssembly assembly,
> String[] args)
>       at System.AppDomain.ExecuteAssembly(String assemblyFile,
> Evidence assemblySecurity, String[] args)
>       at
> Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
>       at System.Threading.ThreadHelper.ThreadStart_Context(Object
> state)
>       at System.Threading.ExecutionContext.Run(ExecutionContext
> executionContext, ContextCallback callback, Object state, Boolean
> ignoreSyncCtx)
>       at System.Threading.ExecutionContext.Run(ExecutionContext
> executionContext, ContextCallback callback, Object state)
>       at System.Threading.ThreadHelper.ThreadStart()
>  InnerException: System.TypeInitializationException
>       Message=The type initializer for 'clojure.lang.Compiler' threw
> an exception.
>       Source=Clojure
>       TypeName=clojure.lang.Compiler
>       StackTrace:
>            at clojure.lang.Compiler.LoadAssembly(FileInfo assyInfo)
>            at clojure.lang.RT.load(String pathname, Boolean
> failIfNotFound) in clojure-clr\Clojure\Clojure\Lib\RT.cs:line 1918
>            at clojure.lang.RT.load(String pathname) in clojure-clr
> \Clojure\Clojure\Lib\RT.cs:line 1898
>            at clojure.lang.RT.DoInit() in clojure-clr\Clojure\Clojure
> \Lib\RT.cs:line 543
>            at clojure.lang.RT..cctor() in clojure-clr\Clojure\Clojure
> \Lib\RT.cs:line 538
>       InnerException: System.Reflection.AmbiguousMatchException
>            Message=Ambiguous match found.
>            Source=mscorlib
>            StackTrace:
>                 at System.RuntimeType.GetMethodImpl(String name,
> BindingFlags bindingAttr, Binder binder, CallingConventions callConv,
> Type[] types, ParameterModifier[] modifiers)
>                 at System.Type.GetMethod(String name)
>                 at clojure.lang.Compiler..cctor() in clojure-clr
> \Clojure\Clojure\CljCompiler\Compiler.cs:line 190
>            InnerException:
>
>
> -----------------------------------------------------------------------------------------------
>
> -----------------------------------------------------------------------------------------------
>
> If I reduce Main() to exclusively be:
> RT.random();
>
> I get a pop up that the application has encountered an exception and
> needs to close, with the signature:
>
>
> -----------------------------------------------------------------------------------------------
>
> -----------------------------------------------------------------------------------------------
> EventType : clr20r3     P1 : clojureinteroptest.exe     P2 :
> 1.0.0.0
> P3 : 4bd10730     P4 : mscorlib     P5 : 4.0.0.0     P6 : 4ba1da6f
> P7 : fed
> P8 : 4f     P9 : system.reflection.ambiguousmatch
>
> -----------------------------------------------------------------------------------------------
>
> -----------------------------------------------------------------------------------------------
>
> Is this tutorial up to date? I have the Clojure, Microsoft.{Dynamic,
> Scripting, Scripting.Core, Scripting.ExtensionAttribute} projects in
> the solution, and each is referenced by the test project.
>
> Thanks,
> Joerthan

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

Reply via email to