News

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."

About the Author

David Ramel is an editor and writer at Converge 360.

comments powered by Disqus

Featured

  • Compare New GitHub Copilot Free Plan for Visual Studio/VS Code to Paid Plans

    The free plan restricts the number of completions, chat requests and access to AI models, being suitable for occasional users and small projects.

  • Diving Deep into .NET MAUI

    Ever since someone figured out that fiddling bits results in source code, developers have sought one codebase for all types of apps on all platforms, with Microsoft's latest attempt to further that effort being .NET MAUI.

  • Copilot AI Boosts Abound in New VS Code v1.96

    Microsoft improved on its new "Copilot Edit" functionality in the latest release of Visual Studio Code, v1.96, its open-source based code editor that has become the most popular in the world according to many surveys.

  • AdaBoost Regression Using C#

    Dr. James McCaffrey from Microsoft Research presents a complete end-to-end demonstration of the AdaBoost.R2 algorithm for regression problems (where the goal is to predict a single numeric value). The implementation follows the original source research paper closely, so you can use it as a guide for customization for specific scenarios.

  • Versioning and Documenting ASP.NET Core Services

    Building an API with ASP.NET Core is only half the job. If your API is going to live more than one release cycle, you're going to need to version it. If you have other people building clients for it, you're going to need to document it.

Subscribe on YouTube