Omnisharp-vscode: Quick fix/lightbuld option 'Generate variable' doesn't seem to work.

Created on 19 Oct 2016  路  2Comments  路  Source: OmniSharp/omnisharp-vscode

Environment data

dotnet --info output:

$ dotnet --info
.NET Command Line Tools (1.0.0-preview2-003133)

Product Information:
 Version:            1.0.0-preview2-003133
 Commit SHA-1 hash:  74df06500c

Runtime Environment:
 OS Name:     Windows
 OS Version:  10.0.10586
 OS Platform: Windows
 RID:         win10-x64

VS Code version: 1.6.1
C# Extension version: 1.4.1

Steps to reproduce

1 - Create a new class passing a parameter in to its constructor and set the parameter to an undeclared variable like this:

namespace RomanNumerals
{
    public class TestClass
    {
        public void FirstMethod(string something) {
            _something = something;
        }
    }
}

2 - Hover over the undeclared variable _something and click on the lightbulb (or put your cursor in _something and key Ctrl+.)
3 - Select 'Generate variable' from the list

Expected behavior

Not entirely sure. A variable being created in the constructor (was hoping that a field would be created on the class really, a la resharper's introduce variable > field)

Actual behavior

Nothing happens, as far as I an tell.

Bug Resolved-Fixed

Most helpful comment

This is fixed for 1.7

image

All 2 comments

Yep this feature doesn't work, please someone FIX !!! its simple

This is fixed for 1.7

image

Was this page helpful?
0 / 5 - 0 ratings