dotnet / dotnet/fsharp

Visual Studio option to build F# projects with the .NET SDK compiler (on by default)

Open
#20,484 0 comments 1 reaction 0 assignees View on GitHub
Feature Request Needs-Triage
Dominant language
F#
Stars
4.3k
Forks
876
Avg merge
4d 11h
Merged PRs (30d)
131

Description

**Is your feature request related to a problem? Please describe.**

In Visual Studio, F# projects build with the .NET Framework compiler bundled in VS, while `dotnet build` uses the .NET SDK compiler. The two can differ, so the same project can behave differently in VS than on the command line — and there is no UI to control which is used.

**Describe the solution you'd like**

A **Tools → Options → F# Tools → Compiler** checkbox **"Use the .NET SDK F# compiler for builds"**, **on by default**, so VS matches `dotnet build`. Turn it off to fall back to the Visual Studio (.NET Framework) compiler.

**Additional context**

VS-only; command-line builds are unaffected.

Risks to be aware of:
- **Editor vs build divergence:** Visual Studio's background analysis (IntelliSense, error squiggles, the in-process type checker) runs on .NET Framework and is *not* affected by this option — it always uses the VS-hosted compiler. With the option on, your *build* uses the SDK compiler while *design-time* editor feedback still uses the VS compiler, so if the two compiler versions differ you may occasionally see build results that don't match the editor.
- **.NET Framework type providers:** a project depending on a type provider whose design-time component ships only for .NET Framework must turn this option **off** to build — the SDK compiler can't load a .NET-Framework-only design-time assembly.

Contributor guide

Open the contributing guide

Research direction

Start by locating the Visual Studio F# Tools → Compiler options entry point and the build path that chooses between the Visual Studio and .NET SDK compilers. Confirm how the option is persisted and applied, then verify that it defaults on, the off state selects the Visual Studio compiler, command-line builds are unchanged, and design-time analysis remains unaffected.

Written by the indexing model from the issue text.

Assessment

Tech stack
fsharp
Domain
build-system, tooling
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.