Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem invoking 'RunCodeAction' on OmniSharp server: null #975

Closed
hugonijmek opened this issue Nov 21, 2016 · 8 comments
Closed

Problem invoking 'RunCodeAction' on OmniSharp server: null #975

hugonijmek opened this issue Nov 21, 2016 · 8 comments
Assignees
Milestone

Comments

@hugonijmek
Copy link

hugonijmek commented Nov 21, 2016

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

@hugonijmek
Copy link
Author

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: '' is not part of the workspace.
[INFORMATION:OmniSharp.Middleware.LoggingMiddleware] /v2/runcodeaction: 500 8ms

@jchannon
Copy link
Contributor

jchannon commented Nov 29, 2016

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.

@hugonijmek
Copy link
Author

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.

@micdah
Copy link

micdah commented Dec 5, 2016

I'm also experiencing this bug in macOS running VS Code 1.7.2

@Galilyou
Copy link

Galilyou commented Dec 10, 2016

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

@sureshviprak
Copy link

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

@jpierson
Copy link

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

@madslyng
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

8 participants