Skip to content

F# open Codefix does not work if file contains only one line #9757

@vsfeedback

Description

@vsfeedback

This issue has been moved from a ticket on Developer Community.


In Version 16.5.0 Preview 1.0, if you try to apply a suggested 'open' Codefix in a file that contains only one line, it does not actually apply the Codefix. If you however add an empty line before or after the line where the codefix is offered, it works as expected. This applies to .fs and .fsx files both.

Steps to reproduce:

  1. Create any F# Project
  2. Create a new file (either .fs or .fsx)
  3. Write a single line that provokes an 'open' Codefix, such as let test = Console.WriteLine()
  4. Try to apply one of the offered 'open' Codefixes, both will fail
  5. Add an empty line before or after the line and both will work as expected

Possible workaround is to just add an empty line before or after as this only seems to happen with files that contain exactly one line only.


Original Comments

Feedback Bot on 12/30/2019, 01:53 AM:

We have directed your feedback to the appropriate engineering team for further evaluation. The team will review the feedback and notify you about the next steps.

Feedback Bot on 2/6/2020, 07:32 PM:

I have detected that for the last 35 days, this issue didn't have much product team activity and a very small amount of new votes or comments. Based on this, its severity, and affected area, it’s my experience that this issue is very unlikely to be fixed.

Feedback Bot on 3/13/2020, 07:49 PM:

Thank you for sharing your feedback! Our teams prioritize action on product issues with broad customer impact. See details at: https://docs.microsoft.com/en-us/visualstudio/ide/report-a-problem?view=vs-2019#faq. In case you need answers to common questions or need assisted support, be sure to use https://visualstudio.microsoft.com/vs/support/. We’ll keep you posted on any updates to this feedback.


Original Solutions

(no solutions)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions