You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a couple of variables declaration using var instead of the explicit type. In Visual Studio, Omnisharp would suggest me to use the explicit type instead and I could make the change automatically by using the keyboard shortcut (Ctrl+.).
This was super useful and I can't figure out how to make it work inside VS Code. I was not able to find any documentation, issues or articles related to this so I'm creating a new issue.
In this specific case I was doing a LINQ group by and I wanted to be able to use the explicit type and then go look at the type definition for IGrouping.
Steps to Reproduce
var myCustomObject = new CustomObject();
Expected Behavior
Suggest the option to use the explicit type when using the code actions keyboard shortcut.
Actual Behavior
Missing suggestion:
Environment information
VSCode version: 1.46.1 C# Extension: 1.22.1
Dotnet Information
.NET Core SDK (reflecting any global.json):
Version: 3.1.301
Commit: 7feb845744
Runtime Environment:
OS Name: Windows
OS Version: 10.0.18362
OS Platform: Windows
RID: win10-x64
Base Path: C:\Program Files\dotnet\sdk\3.1.301\
Host (useful for support):
Version: 3.1.5
Commit: 65cd789777
This is driven from a .editorconfig where conventions for var vs. explicit types are configured. Roslyn uses that to determine when to suggest style changes. Is .editorconfig in use for your codebase?
This is driven from a .editorconfig where conventions for var vs. explicit types are configured. Roslyn uses that to determine when to suggest style changes. Is .editorconfig in use for your codebase?
Issue Description
I have a couple of variables declaration using
var
instead of the explicit type. In Visual Studio, Omnisharp would suggest me to use the explicit type instead and I could make the change automatically by using the keyboard shortcut (Ctrl+.
).This was super useful and I can't figure out how to make it work inside VS Code. I was not able to find any documentation, issues or articles related to this so I'm creating a new issue.
In this specific case I was doing a LINQ group by and I wanted to be able to use the explicit type and then go look at the type definition for IGrouping.
Steps to Reproduce
var myCustomObject = new CustomObject();
Expected Behavior
Suggest the option to use the explicit type when using the code actions keyboard shortcut.
Actual Behavior
Missing suggestion:
Environment information
VSCode version: 1.46.1
C# Extension: 1.22.1
Dotnet Information
.NET Core SDK (reflecting any global.json): Version: 3.1.301 Commit: 7feb845744Runtime Environment:
OS Name: Windows
OS Version: 10.0.18362
OS Platform: Windows
RID: win10-x64
Base Path: C:\Program Files\dotnet\sdk\3.1.301\
Host (useful for support):
Version: 3.1.5
Commit: 65cd789777
.NET Core SDKs installed:
3.1.301 [C:\Program Files\dotnet\sdk]
.NET Core runtimes installed:
Microsoft.AspNetCore.All 2.1.19 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All]
Microsoft.AspNetCore.All 2.2.8 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All]
Microsoft.AspNetCore.App 2.1.19 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 2.2.8 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 3.1.5 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.NETCore.App 2.1.19 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 2.2.8 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 3.1.5 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.WindowsDesktop.App 3.1.5 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
To install additional .NET Core runtimes or SDKs:
https://aka.ms/dotnet-download
Visual Studio Code Extensions
The text was updated successfully, but these errors were encountered: