Skip to content
Sign upLog in
← Back to Community

How can I add a reference to a standard .Net assembly in a Repl?

Profile icon
hawsr

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?
Voters
Profile icon
JulianThomas3
Profile icon
ChloeKay1
Profile icon
EstebanGuzmn
Profile icon
solly_ucko
Profile icon
suzannesoy
Profile icon
hawsr
Comments
hotnewtop
Profile icon
solly_ucko

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.

Profile icon
SixBeeps

Try adding the DLL to the file system