# Get .NET Link to work on Raspberry Pi

Is it possible to get the .NET Link working on Raspberry Pi?

I understand that Linux and MacOS versions of Mathematica come with .NET Link running on Mono and now even possibly under new open-source .NET Core:

But not RPi:

Needs["NETLink"]


produces

... cannot find the package on RPi.

So to get .NET Link working on RPi, can I use approach similar to copying Python files from desktop version to RPi as described in the following link?

• .NET/Link is not included in the Raspberry Pi version of Mathematica. – Szabolcs Mar 28 '15 at 13:23
• The approach used to get Python bindings won't work here. You can copy the windows version of NETLink to the RPi ("can" doesn't necessarily mean "allowed to"); however, InstallNET.exe and the accompanying dll are for Windows, not the RPi, and would need to be recompiled. There is a 'source' directory included in the NETLink file structure, but I don't know enough about the platform to say whether or not you can recompile for the RPi. This is probably a good question for WC. – bobthechemist Mar 28 '15 at 16:46
• @bobthechemist I don't know about about .NET, but I thought that the platform independent Mono/.NET executables also have an .exe extension. The Mac version of .NET/Link also comes with an InstallNET.exe. Perhaps this is not a Windows executable after all. – Szabolcs Mar 28 '15 at 20:51
• @bobthechemist Well, it turns out copying it does work :) Note to the OP: I guess first thing to do is to just try. – Szabolcs Mar 28 '15 at 21:14

Okay, I tried this and it seems to work.

1. I copied NETLink from a Mac to /opt/Wolfram/WolframEngine/10.0/SystemFiles/Link.

2. I installed the full mono package: sudo apt-get install mono-complete

3. Started wolfram, loaded <<NETLink, then evaluated InstallNET[]. It seems to work.

I don't know much about .NET though so I can't test in detail.

• Yup, got this far. I wasn't able to get any of the examples to work properly, however. – bobthechemist Mar 28 '15 at 23:10
• @bobthechemist I'm not sure which examples are Windows specific ... many of them are GUI related. So I only tried LoadNETType["System.GC"]; GCCollect[];`, which seemed like something that should work across platforms. It worked fine. I think if something doesn't work, that's likely because the RPi version of Mono doesn't have it and not because of any limitations of .NET/Link. But I might be wrong, I don't use .NET. – Szabolcs Mar 29 '15 at 0:49
• Good point, I tried the circumference one which didn't seem to work, but I also have insufficient knowledge of .NET to debug further. – bobthechemist Mar 29 '15 at 0:54