This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2023-10-16
Channels
- # aleph (73)
- # babashka (12)
- # beginners (17)
- # calva (9)
- # clerk (8)
- # clj-otel (1)
- # clojars (8)
- # clojure (3)
- # clojure-europe (13)
- # clojure-nl (3)
- # clojure-norway (66)
- # clojure-uk (3)
- # clojuredesign-podcast (2)
- # clojurescript (11)
- # clr (8)
- # conjure (2)
- # core-typed (1)
- # data-science (11)
- # datahike (4)
- # etaoin (5)
- # events (1)
- # graalvm (2)
- # honeysql (27)
- # hyperfiddle (26)
- # introduce-yourself (3)
- # lsp (3)
- # membrane (1)
- # off-topic (60)
- # polylith (20)
- # practicalli (4)
- # reitit (3)
- # shadow-cljs (18)
- # specter (2)
- # xtdb (1)
hi, does anyone know if I could call .NET Framework version 4 code from clojure clr? Context: No experience with .NET . Romanian government has an app built with .net framework 4 for which I have the DLL's and full app (installer) I would like to make some integrations. Could I call code from those DLL's from clojure CLI? Any examples?
I'm doing similar with a dotnet 7 project. My setup looks like this https://gist.github.com/jamesdavidson/58adb94129fe5b1c3832eed9014923e8 which is based on how https://github.com/Dangercoder/potion works. Coming from the JVM it took me a while to work out that I needed to do (assembly-load "Foo")
before I could import classes from Foo.dll
. Hope that helps
ClojureCLR is compatible with Framework 4.x and .Net 6/7 (and soon 😎
Yes, the assembly-loads are necessary.
(I've contemplated adding a clause to the ns
form to do it. Some code analysis packages assume the ns
comes first. Nothing you are likely to be troubled by at this point.)
thanks. any idea if assemblies are cross platform? the app is for Windows, I would like to try it on Linux. I assume the native gui bits will not work, but if any code is library, could it work?
I think .NET Framework 4 is a Windows only thing but honestly without familiarity in the whole Microsoft ecosystem I find it so confusing