Skip to content

No unification of build and intellisense diagnostics in VS2017 (was in VS2015) #3047

@dsyme

Description

@dsyme

There are likely multiple issues with the Visual Studio Error list.. I'm splitting out one known repro for a basic one, which is the lack of "Error Unification" between build and intellisense errors.

  1. open any solution, e,g,

    devenv tests\projects\misc\TestProjectChanges\TestProjectChanges.sln

2,. add an error, watch intelliense error appear

  1. do a build, wathc duplicate copy of "build" error appear

  2. fix the error - the "intellisense" copy goes away, but the red suiglly stays

  3. do a build - the "build" error goes away

Although logical, it is painful to have the red squiggly stay around even after you've fixed the error. In practice this means that once you do a build, and there are errors, you have to keep doing builds do clear all your red-squigglies, or else resort to showing Intellisense errors only.

This is a regression (or at least a change) from how F# worked in VS2015 and before, when build and intellisense errors were "unified" and fixing an error made it disappear from the error list - the user just was not particularly aware of the distinction between build and intellisense errors.

Now I'm not sure how deeply this distinction is built into Roslyn - it may not be something we control anymore - advice welcome please @Pilchie @DustinCampbell

Note that the diagnostic ID is also missing for the build error - this could be the underlying problem since some comments in the F# language service code imply that error de-duplication should be ocurring. It's possible this is a problem with whichever error parser is being used by default

image

Here is the output from the build, it contains FS0039

3>C:\GitHub\dsyme\visualfsharp\tests\projects\misc\TestProjectChanges\TestProjectChanges\Program.fs(7,58): error FS0039: The field, constructor or member 'PropertyA' is not defined. Maybe you want one of the following: PropertyAlwaysAvailable
3>Done building project "TestProjectChanges.fsproj" -- FAILED.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions