Ask coding questions

← Back to all posts
How can I add a reference to a standard .Net assembly in a Repl?
hawsr (3)

How can I add a reference to a standard .Net assembly in a Repl? I am specifically trying to use

Namespace: System.Device.Location
Assembly: System.Device.dll

Code:

using System.Device.Location

Error:

The type or namespace name `Device' does not exist in the namespace `System'. Are you missing an assembly reference?
Comments
hotnewtop
solly_ucko (0)

You can run the compiler manually: e.g. mcs -out:main.exe -reference:System.Device main.cs, then run the executable using mono main.exe. See also https://stackoverflow.com/questions/8264783/how-to-reference-these-packages-with-mono-in-order-to-compile.

SixBeeps (5062)

Try adding the DLL to the file system