@@ -251,21 +251,23 @@ let evaluateSession(argv: string[]) =
251251member __.ReportUserCommandLineArgs args = fsiConfig0.ReportUserCommandLineArgs args
252252member __.EventLoopRun () =
253253#if ! FX_ NO_ WINFORMS
254- match fsiWinFormsLoop.Valuewith
254+ match ( if fsiSession.IsGui then fsiWinFormsLoop.Valueelse None ) with
255255| Some l-> ( l:> IEventLoop ). Run ()
256256| _ ->
257257#endif
258258 fsiConfig0.EventLoopRun()
259+
259260member __.EventLoopInvoke ( f ) =
260261#if ! FX_ NO_ WINFORMS
261- match fsiWinFormsLoop.Valuewith
262+ match ( if fsiSession.IsGui then fsiWinFormsLoop.Valueelse None ) with
262263| Some l-> ( l:> IEventLoop ). Invoke ( f )
263264| _ ->
264265#endif
265266 fsiConfig0.EventLoopInvoke( f)
267+
266268member __.EventLoopScheduleRestart () =
267269#if ! FX_ NO_ WINFORMS
268- match fsiWinFormsLoop.Valuewith
270+ match ( if fsiSession.IsGui then fsiWinFormsLoop.Valueelse None ) with
269271| Some l-> ( l:> IEventLoop ). ScheduleRestart ()
270272| _ ->
271273#endif
@@ -279,7 +281,7 @@ let evaluateSession(argv: string[]) =
279281member __.GetOptionalConsoleReadLine ( probe ) = getConsoleReadLine( probe) }
280282
281283// Create the console
282- and fsiSession = FsiEvaluationSession.Create( fsiConfig, argv, Console.In, Console.Out, Console.Error, collectible= false , legacyReferenceResolver= MSBuildReferenceResolver.Resolver)
284+ and fsiSession : FsiEvaluationSession = FsiEvaluationSession.Create( fsiConfig, argv, Console.In, Console.Out, Console.Error, collectible= false , legacyReferenceResolver= MSBuildReferenceResolver.Resolver)
283285
284286
285287#if ! FX_ NO_ WINFORMS