-
Notifications
You must be signed in to change notification settings - Fork 682
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
GalliumOS Omnisharp.path error #848
Comments
I changed Omnisharp.exe to OmniSharp.exe in the path, that still didn't fix it. |
The entire path is case-sensitive. Also, what version of Mono do you have installed? |
There's a screenshot with mono -v, VC settings.json, and the file manager open to the Omnisharp install. I did fix the syntax error that's present in the json Mono is working fine. I can run the hello test just fine. I get this error when I run a simple .cs file though rightclick -> Run Code [Running] scriptcs "/home/chrx/Documents/TestingOmni/Program.cs" [Done] exited with code=127 in 0.031 seconds While testing different ideas, I found by renaming Omnisharp (the one highlighted in the file manager) to Omnisharp.exe I now get this on startup: Starting OmniSharp server at 11/1/2016, 12:27:50 AM OmniSharp server started wth Mono Cannot open assembly '/home/chrx/Omnisharp/OmniSharp.exe': File does not contain a valid CIL image. I still get the same error when trying rghtclk->Run Code. I get the same as the above when changing the omnisharp.path to /home/chrx/Omnisharp/OmniSharp while I changed OmniSharp.exe back to OmniSharp |
When you say that you right-click a file and choose Run Code, I'm actually not clear on where that is. I've been unable to find a "Run Code" command in VS Code. Perhaps that is coming from some other extension? Could you try the latest v1.5-future-preview1 release of the C# extension. I suspect this may work better. Do the following to install the new extension:
|
That's from formulahendry.code-runner He's output after installing the new version (code-runner disabled just incase): Updating C# dependencies... Finished Tried to uninstall/reinstall, but that didn't change anything. EDIT: [ERROR] Error: spawn /home/chrx/.vscode/extensions/ms-vscode.csharp-1.5.0-future-preview1/bin/run ENOENT |
@Neoakb can you give us the output from @chuckries looks like we have some (multiple?) sort of issue here as it is trying to download multiple versions of the debugger, and then CentOS is giving a 404. |
NAME="GalliumOS" |
@Neoakb one last question - are you trying to do .NET Core development or mono? If .NET Core, are you finding that the Ubuntu 16 version of .NET Core works well enough? Or are you using some sort of other version? |
I am using this course to learn C# and wanted to be able to work while I was away. With .NET Core it seems like I'll be able to develop on and for most systems. I'm 'technologically inclined', but I'm still a novice programmer. |
@Neoakb got it. We haven't tried Gallium at all, but I can give you a test version of the C# extension later today which causes it to treat Gallium like Ubuntu 16 and you can see if that works for you. |
@Neoakb please try this:
|
C# Output: Installing package 'Mono Runtime (Linux / x64)' Finished Debug Console: Find
} DEBUG CONSOLEYou may only use the C# Extension for Visual Studio Code with Visual Studio applications.Loaded '/usr/share/dotnet/shared/Microsoft.NETCore.App/1.0.1/System.Private.CoreLib.ni.dll'. Cannot find or open the symbol file. Intellisense seems to work. I think we might be good. Don't know about those missing symbol files though. (TBH I know nothing about them either way.) |
@Neoakb the 'Cannot find or open the symbol file' is normal for system assemblies. There is an issue to give that a nicer message so it doesn't sound like a problem, but we haven't fixed it yet. Were you able to hit a breakpoint and inspect values? |
I was just using a simple hello world to test. want me to test specific code or just make some variables and change them, etc. |
It would be enough to just set a breakpoint on the 'Console.WriteLine' line and verify you can inspect 'args'. |
me <- thrilled that IntelliSense works! |
Just tested and it worked just fine. Looks like I'm set now. Anything I should keep an eye on? When to update back to the normal C# extension and what not. |
@Neoakb The only things to keep in mind are:
|
@gregg-miskelly: What change is needed? |
Awesome! Thanks for the help. Hope I helped somehow! |
merge it 😄 |
The fix in the release branch now. Thanks @Neoakb! It'll be in 1.5. |
Environment data
dotnet --info
output:.NET Command Line Tools (1.0.0-preview2-003131)
Product Information:
Version: 1.0.0-preview2-003131
Commit SHA-1 hash: 635cf40e58
Runtime Environment:
OS Name: galliumos
OS Version: 2.0
OS Platform: Linux
RID: galliumos.2.0-x64
VS Code version: latest
C# Extension version: latest
Steps to reproduce
Start VC
Expected behavior
Actual behavior
this came first:
[ERROR] Could not locate an OmniSharp server that supports your Linux distribution.
OmniSharp provides a richer C# editing experience, with features like IntelliSense and Find All References.
It is recommend that you download the version of OmniSharp that runs on Mono using the following steps:
1. If it's not already installed, download and install Mono (https://www.mono-project.com)
2. Download and untar the latest OmniSharp Mono release from https://github.com/OmniSharp/omnisharp-roslyn/releases/
3. In Visual Studio Code, select Preferences->User Settings to open settings.json.
4. In settings.json, add a new setting: "omnisharp.path": "/path/to/omnisharp/OmniSharp.exe"
5. In settings.json, add a new setting: "omnisharp.useMono": true
6. Restart Visual Studio Code.
So I followed the instructions. my setting.json:
// Place your settings in this file to overwrite the default settings
{
"omnisharp.path": "/home/chrx/Omnisharp/Omnisharp.exe",
"omnisharp.useMono": true
}
I get this error on startup:
Invalid value specified for "omnisharp.path" ('/home/chrx/Omnisharp/Omnisharp.exe).
The text was updated successfully, but these errors were encountered: