6
votes

The F# Interactive (fsi.exe) has a directive to reference a given assembly:

>#help;;
   [...]
   #r "file.dll";;        Reference (dynamically load) the given DLL
   [...]

I often like to unload/unreference previously referenced assemblies in order to recompile them. Is that possible?

Edit: I'm running fsi under MacOSX and Mono - should be the same as from command line under windows.

1
if it loads with the regular Assembly.Load, then I guess not: blogs.msdn.com/suzcook/archive/2003/07/08/57211.aspx - Mauricio Scheffer
That does not look promising... but thank you. - Johan Kullbom
Unless the FSI implementation is very naive, all dynamic assembly loading will be performed in a sandboxed AppDomain, which can be unloaded. You won't be able to unload individual assemblies though. - Robert Jeppesen

1 Answers

4
votes

You can right click and select Reset Session. But obviously this clears everything, not just your references.