Skip to content
Visual Studio Extension for VS 2019 that provides a File Structure Toolwindow for F#
C# F# Batchfile
Branch: master
Clone or download

Latest commit

Fetching latest commit…
Cannot retrieve the latest commit at this time.

Files

Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
FSharpFileAst
LabApp
Tools
VSIXFSharpStruct
.gitignore
README.md
VSIXFSharpStruct.sln
preview-dark.PNG
preview.PNG

README.md

F# File Structure Toolwindow for Visual Studio

Visual Studio Extension for VS 2019 that provides a File Structure Toolwindow for F#

Rider has it, Ionide has it, now Visual Studio has it too.

Available at https://marketplace.visualstudio.com/items?itemName=snuup.FSharpFileStructure or inside the VS extension manager.

preview

The project holds 3 assemblies in 3 projects:

FSharpFileAst (F#)

An F# project that computes the abstract syntax tree (AST) from a file and converts it into a TreeModel, which is another tree acting as the model of the XAML control that displays the file structure.

LabApp (C#)

This project references the user interface code inside VSIXSharpStruct and hosts the file structure control as a simple XAML App. This is useful whe working and debugging the ui part of the toolwindow.

VSIXFSharpStruct (C#)

The Visual Studio extension providing the toolwindow.

The tricky thing

Visual Studio extensions must be signed, including all referenced assemblies. Signing FSharpFileAst and VSIXSharpStruct is simple. The problem is that FSharp.Compiler.Service.dll assembly comes unsigned. To get around that, I converted the assembly with ilasm as can be seen in tools/sign.bat. The signed assembly is in the lib folder together with the dependencies of FSharp.Compiler among which only the System.Buffers assembly is really needed. Instead of nuget packages, the projects refernce those assembly files so they get the signed versions.

You can’t perform that action at this time.