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

OmniSharp invalid CIL #853

Closed
weinand opened this issue Oct 30, 2016 · 10 comments
Closed

OmniSharp invalid CIL #853

weinand opened this issue Oct 30, 2016 · 10 comments

Comments

@weinand
Copy link

weinand commented Oct 30, 2016

From @darkoverlordofdata on October 28, 2016 20:27

  • VSCode Version: 1.6.1
  • OS Version: elementary OS 0.4 Loki (64-bit) - Built on "Ubuntu 16.04 LTS"

Steps to Reproduce:

  1. Followed instructions at https://www.microsoft.com/net/core#ubuntu
  2. Restart VSCode

Get the following output:
Starting OmniSharp server at 10/28/2016, 1:22:37 PM
Target: /home/bruce/Downloads/WindowsExplorer_C/WindowsExplorer_C.sln

OmniSharp server started wth Mono
Path: /home/bruce/Applications/omnisharp-ubuntu16-x64-netcoreapp1.0/OmniSharp
PID: 23323

Cannot open assembly '/home/bruce/Applications/omnisharp-ubuntu16-x64-netcoreapp1.0/OmniSharp': File does not contain a valid CIL image.
[ERROR] Error: Failed to start OmniSharp

Copied from original issue: microsoft/vscode#14676

@DustinCampbell
Copy link
Member

@darkoverlordofdata: the output above seems very strange. I'm not sure why it would try to launch a .NET Core version of OmniSharp with Mono, but I'm guessing that's the problem.

Did you set "omnisharp.useMono": true in your VS Code settings? If so, that won't work with the .NET Core version of OmniSharp. That version is standalone.

@abadi45
Copy link

abadi45 commented Nov 5, 2016

I'm having the same issue, is there anything I can try ?

@DustinCampbell
Copy link
Member

Have you set the "omnisharp.path" and "omnisharp.useMono" settings?

@abadi45
Copy link

abadi45 commented Nov 5, 2016

Thanks for the reply.
its working now i deleted the extension and installed the latest beta using vsix, didn't use path or use mono the extension itself installed all the dependencies.

@DustinCampbell
Copy link
Member

Makes sense. Out of curiosity, which version of the extension did you install? Was it from the VS Code marketplace? Or, was it one of the beta releases available on this repo?

@darkoverlordofdata
Copy link

I've set useMono to false, and it loads. That seems counter-intuitive since I'm on linux, wouldn't I want to use mono? Anyway, it them can compile, but it can't run - I get a message:

Run 'Debug: Download .NET Core Debugger' in the Command Palette or open a .NET project directory to download the .NET Core Debugger

But when I do that, nothing happens. It doesn't seem like this product is ready yet....

@DustinCampbell
Copy link
Member

It's a bit counter-intuitive, but you downloaded the standalone OmniSharp that is built for Ubuntu. That version runs natively on Ubuntu and doesn't need Mono. There is a Mono build of OmniSharp that requires Mono to run.

@DustinCampbell
Copy link
Member

Glad both of you got it working. Note that this should be much easier in the 1.5 release, which is coming soon.

@fennecfoxsolutions
Copy link

I get something like:

[fail]: OmniSharp.MSBuild.ProjectFile.ProjectFileInfo The project 'd: \ Projects GIT \ Fennec Fox Solutions \ FoxAccount \ src \ FoxAccount.Application \ FoxAccount.Application.csproj' does not have any destination structure compatible with '.NETCoreApp, Version = v2.0 '.

@DustinCampbell
Copy link
Member

Could you file a new issue rather than reporting on a year-old closed issue? Thanks!

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

5 participants