fssnippets / fssnip-website

Source code for the F# Snippets web site
http://fssnip.net
103 stars 36 forks source link

Build.findPort #42

Closed tforkmann closed 8 years ago

tforkmann commented 9 years ago

The Build.findPort function in build.fsx is not compatible with Mono.

Error-Message: System.NotImplementedException: The method or operation is not implemented. at System.Net.NetworkInformation.UnixIPGlobalProperties.GetActiveTcpListeners () <0x921c020 + 0x0001f> in :0 at FSI_0001.Build.findPort (Int32 port) <0x921be50 + 0x0001f> in :0 at <StartupCode$FSI_0001>.$FSI_0001_Build$fsx.main@ () <0x921b268 + 0x002e3> in :0 at (wrapper managed-to-native) System.Reflection.MonoMethod:InternalInvoke (System.Reflection.MonoMethod,object,object[],System.Exception&) at System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) <0x1a55c40 + 0x000a1> in :0 Stopped due to error

tpetricek commented 9 years ago

Uh oh, that's silly! @forki do you have any thoughts how this could be done better? I can only think of just wrapping the start server call in an exception handler and trying next port if it fails... (which might work just fine)

forki commented 9 years ago

Just revert it then. Sorry