If you want to try F# programming in Visual Studio 2017, here’s what you might want to do to optimize Visual Studio to run optimally on your machine.
- From the menu, go to Tools and select Options.
- Under Debugging, set the Enable script debugging to True.
- Under Misc, set 64-bit F# Interactive to True (if you use 64-bit Windows OS).
- Set F# Interactive options to the following:
--optimize- --readline+ --debug+ -d:TRACE
Set Shadow copy assemblies to True and click OK.
This “once and forget it” setup serves the following purposes:
- Enable you to debug F# in Visual Studio and run it as a 64-bit process (better).
- Set Visual Studio to output trace messages within F# scripts. You can also check the F# Interactive Options and the compiler options for more details.
- Set the referenced assemblies not to be locked by the F# Interactive process.
- Next, scroll up to Text Editor and expand on the F#.
Under General, check the Line numbers and click OK.
One more tip with F# project, when creating a new F# project you can choose between .NET Core or .NET Standard. But you can also use the .NET Framework for F# Console Application. Just make sure you select Visual F# on the left-pane of the new project window, then you can select the .NET Framework you want to use for your project.
Further Reading
Get Programming with F: A guide for .NET developers
F# Interactive Options
F# Compiler Options
Leave a Reply