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
thanks, I will check it out
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
thanks. I have the same hunch.
I will do some research
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.)