Problem invoking 'RunCodeAction' on OmniSharp server: null
Environment data
dotnet --info output:
.NET Command Line Tools (1.0.0-preview2-1-003177)
Product Information: Version: 1.0.0-preview2-1-003177 Commit SHA-1 hash: a2df9c2576
Runtime Environment: OS Name: ubuntu OS Version: 16.04 OS Platform: Linux RID: ubuntu.16.04-x64
VS Code version: 1.7.1 C# Extension version: Both 1.5.3 and 1.6-beta1 and 1.6-beta3
Steps to reproduce
Create a asp.net core empty web project Open an existing class Type an additional class under the existing class ie
public class ExistingClass
{
}
public class NewClass
{
}
Place the pointer on the NewClass object Press 'Ctrl' + '.' Press the appearing option 'Move type to NewClass.cs'
Expected behavior
The NewClass is moved to NewClass.cs
Actual behavior
Problem invoking 'RunCodeAction' on OmniSharp server: null Class is not moved to a new file
Some additional info from the omnisharp log:
[INFORMATION:OmniSharp.Roslyn.CSharp.Services.Refactoring.V2.RunCodeActionService] Applying Microsoft.CodeAnalysis.CodeRefactorings.MoveType.AbstractMoveTypeService`5+MoveTypeCodeAction[Microsoft.CodeAnalysis.CSharp.CodeRefactorings.MoveType.CSharpMoveTypeService,Microsoft.CodeAnalysis.CSharp.Syntax.BaseTypeDeclarationSyntax,Microsoft.CodeAnalysis.CSharp.Syntax.NamespaceDeclarationSyntax,Microsoft.CodeAnalysis.CSharp.Syntax.MemberDeclarationSyntax,Microsoft.CodeAnalysis.CSharp.Syntax.CompilationUnitSyntax]
[ERROR:Microsoft.AspNetCore.Diagnostics.ExceptionHandlerMiddleware] An unhandled exception has occurred: '
Can confirm I see the same however I get An unhandled exception has occurred: '<Document3eadf281-0897-4506-bf0c-30123e980594>' is not part of the workspace.
I've just tested this in the 1.6-beta3 and it also happens there. If there is anything I can do to help fix this, please let me know.
I'm also experiencing this bug in macOS running VS Code 1.7.2
Can Confirm.
VsCode Info:
Version 1.7.2 Commit 7ba55c5860b152d999dda59393ca3ebeb1b5c85f Date 2016-11-21T22:14:18.217Z Shell 1.3.8 Renderer 52.0.2743.82 Node 6.5.0
C# Extension 1.5.3
Not working with Insider + C# Extension 1.5.3 & 1.6.0-beta3
Visual Studio Code - Insiders
Version 1.8.0-insider Commit 7398bcd8634668c1bbda79d5380d46ff57bfbb3c Date 2016-12-12T19:38:08.915Z Shell 1.4.6 Renderer 53.0.2785.143 Node 6.5.0
Same issue with Omnisharp C# extension 1.6.2 using VSCode.
Version 1.8.1 Commit ee428b0eead68bf0fb99ab5fdc4439be227b6281 Date 2016-12-19T14:49:23.350Z Shell 1.4.6 Renderer 53.0.2785.143 Node 6.5.0
Same issue:
Version 1.8.1 Commit ee428b0eead68bf0fb99ab5fdc4439be227b6281 Date 2016-12-19T14:41:20.664Z Shell 1.4.6 Renderer 53.0.2785.143 Node 6.5.0