Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TypeInitializationException on startup #45

Open
Myaushka opened this issue Nov 19, 2010 · 1 comment
Open

TypeInitializationException on startup #45

Myaushka opened this issue Nov 19, 2010 · 1 comment

Comments

@Myaushka
Copy link

I've run Clojure for CLR successfully before on a different machine.
Just downloaded this distribution - https://github.com/downloads/richhickey/clojure-clr/clojure-clr-1.3.0-alpha1-debug-4.0.zip

Running Clojure.Main.exe I get this:

Unhandled Exception: System.TypeInitializationException: The type initializer for 'Clojure.CljMain' threw an exception. ---> System.TypeInitializationException:
The type initializer for 'clojure.lang.RT' threw an exception. ---> System.NotSupportedException: An attempt was made to load an assembly from a network location which would have caused the assembly to be sandboxed in previous versions of the .NET Framework. This release of the .NET Framework does not enable CAS policy by default, so this load may be dangerous. If this load is not intended to sandbox the assembly, please enable the loadFromRemoteSources switch. See http://go.microsoft.com/fwlink/?LinkId=155569 for more information.
at System.Reflection.RuntimeAssembly.nLoadFile(String path, Evidence evidence
)
at System.Reflection.Assembly.LoadFile(String path)
at clojure.lang.Compiler.LoadAssembly(FileInfo assyInfo) in C:\work\clojure-c
lr\Clojure\Clojure\CljCompiler\Compiler.cs:line 1261
at clojure.lang.RT.load(String relativePath, Boolean failIfNotFound) in C:\wo
rk\clojure-clr\Clojure\Clojure\Lib\RT.cs:line 1980
at clojure.lang.RT.load(String relativePath) in C:\work\clojure-clr\Clojure\C
lojure\Lib\RT.cs:line 1960
at clojure.lang.RT.DoInit() in C:\work\clojure-clr\Clojure\Clojure\Lib\RT.cs:
line 543
at clojure.lang.RT..cctor() in C:\work\clojure-clr\Clojure\Clojure\Lib\RT.cs:
line 538
--- End of inner exception stack trace ---
at clojure.lang.RT.var(String ns, String name)
at Clojure.CljMain..cctor() in C:\work\clojure-clr\Clojure\Clojure.Main\Main.
cs:line 26
--- End of inner exception stack trace ---
at Clojure.CljMain.Main(String[] args)

Following directions on the Microsoft page, I added a Clojure.Main.exe.config file with the following, which makes it run OK:

@brodyberg
Copy link

Ran into this as well. In total, Clojure.main.exe.config looks like this:

<configuration>
        <runtime>
        <loadFromRemoteSources  enabled="true"/>
        </runtime>
</configuration>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants