What's New for F# in Visual Studio 16.10
F# and F# tools updates listed in the just-released Visual Studio 16.10 include finally addressing a feature request from 2016 and more.
"For this release, we're continuing our trend of improving the F# experience in Visual Studio to build upon what was released in the VS 16.9 update last February," Microsoft said in a May 26 blog post published during the Microsoft Build 2021 developer conference.
Here's a summary of what's new:
- Support for Go to Definition on external symbols: This addresses a 2016 GitHub issue titled Support Go To Definition/Peek Definition on symbols defined in .NET metadata #1939. After several trial implementations since then, it arrived in VS 16.10, which just shipped this week. Navigating to a declaration works just like it does in source code navigation, via the f12 key or ctrl+click. "When you navigate, Visual Studio generates a complete F# Signature File that represents the module or namespace that the symbol lives under, with XML documentation if it is present. This allows colorization, tooltips, and further navigation to work exactly as if they had been declared as signature files in your own codebase."
Better support for mixing C# and F# projects in a solution: This addressed the annoyance of having to rebuild a project to see other projects if they cross between C# and F#. Thus, if a developer makes a change to a C# project, a rebuild isn't required to see changes in an F# project.
- More quick fixes and refactorings: These include:
- Remove unused binding quick fix
- Use proper inequality operator quick fix
- Add type annotation to object of indeterminate type quick fix
- Add type annotation refactoring
More tooling performance and responsiveness improvements: These include:
- Reduced memory usage
- More IDE features respond immediately
More core compiler improvements: These include:
- Support for WarnOn in project files
- Support for ApplicationIcon in project files
- More span optimizations
Going forward, the team is looking to boost support for F# in the November release of .NET 6, one of three initiatives that include furthering support in .NET Interactive and Visual Studio 2022, for which a roadmap was just published, following a sneak peek last month.
"We're going to lock down on the language features we intend on releasing with soon," Microsoft said in a May 26 blog post published during the Microsoft Build 2021 developer conference.
"We're not intending on adding many language features this time. We feel that there is more value in core compiler improvements and core tooling improvements (F# interactive, Visual Studio) right now. .NET 6 is an LTS release, we're prioritizing existing feature-completeness, performance and reliability. That doesn't necessarily mean a feature freeze. In fact, we may also end up releasing a 'compiler feature' or two, especially when related to improving build times. But it does mean that the set of new language features will be smaller when compared to F# 5. When we have a finalized set of language changes going into .NET 6, we'll announce it and the version number that we'll assign the release."
To provide a great experience with F# in Visual Studio 2022, the dev team must deal with the switch of the IDE to a 64-bit application. "We have a lot of performance analysis work ahead of us. Our preliminary builds indicate that memory usage is ~2x when loading the F# codebase and running an expensive operation like Find All References. We are committed to bringing this factor down as much as possible. On top of that, we want to continue to iterate on Visual Studio productivity features and bring features like Inline Hints, better C# interop, faster build times and more."
David Ramel is an editor and writer for Converge360.