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

Mac Omnisharp Error on RC1 #126

Closed
franzsilva opened this issue Nov 18, 2015 · 45 comments
Closed

Mac Omnisharp Error on RC1 #126

franzsilva opened this issue Nov 18, 2015 · 45 comments
Assignees
Milestone

Comments

@franzsilva
Copy link

Hey Guys im getting the following error in omnisharp Log it looks like its looking for the runtime in the wrong folder.

Could not find any CSX files
[ERROR:OmniSharp.Dnx.DnxPaths] The specified runtime path '1.0.0-rc1-final' does not exist. Searched locations /Users/franzsilva/.dnx/runtimes/dnx-mono.1.0.0-rc1-final
/Users/franzsilva/.dnx/runtimes/kre-mono.1.0.0-rc1-final
/Users/franzsilva/.dnx/packages/KRE-Mono.1.0.0-rc1-final
/Users/franzsilva/.k/runtimes/dnx-mono.1.0.0-rc1-final
/Users/franzsilva/.k/runtimes/kre-mono.1.0.0-rc1-final
/Users/franzsilva/.k/packages/KRE-Mono.1.0.0-rc1-final
/Users/franzsilva/.kre/runtimes/dnx-mono.1.0.0-rc1-final
/Users/franzsilva/.kre/runtimes/kre-mono.1.0.0-rc1-final
/Users/franzsilva/.kre/packages/KRE-Mono.1.0.0-rc1-final

@mykebates
Copy link

Getting the same. :(
@franzsilva, I am curious, have you tried debugging C# yet? I have been unable to get it actually working and I am wondering if it might be related to omnisharp not working.

@irperez
Copy link

irperez commented Nov 19, 2015

I'm having the same issue. It looks like its looking for the old path of the dnvm. Where beta8 was located. Its not picking up the new location.

[INFO] Starting OmniSharp at '/Users/irperez/Repos/dotnet5/webAPI'...
[INFO] Started OmniSharp from '/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/csharp-o/bin/omnisharp' with process id 2444...
[INFORMATION:OmniSharp.Startup] Omnisharp server running using stdio at location '/Users/irperez/Repos/dotnet5/webAPI' on host 2434.
[INFORMATION:OmniSharp.Dnx.DnxPaths] Looking for sdk version in '/Users/irperez/Repos/dotnet5/global.json'.
[INFORMATION:OmniSharp.Dnx.DnxProjectSystem] Scanning '/Users/irperez/Repos/dotnet5/webAPI' for DNX projects
[INFORMATION:OmniSharp.Dnx.DnxProjectSystem] Found project '/Users/irperez/Repos/dotnet5/webAPI/project.json'.
[INFORMATION:OmniSharp.MSBuild.MSBuildProjectSystem] No solution files found in '/Users/irperez/Repos/dotnet5/webAPI'
[INFORMATION:OmniSharp.ScriptCs.ScriptCsProjectSystem] Detecting CSX files in '/Users/irperez/Repos/dotnet5/webAPI'.
/Users/irperez/Repos/dotnet5/global.json(4,37)
The specified runtime path '1.0.0-rc1-final' does not exist. Searched locations /Users/irperez/.dnx/runtimes/dnx-mono.1.0.0-rc1-final
/Users/irperez/.dnx/runtimes/kre-mono.1.0.0-rc1-final
/Users/irperez/.dnx/packages/KRE-Mono.1.0.0-rc1-final
/Users/irperez/.k/runtimes/dnx-mono.1.0.0-rc1-final
/Users/irperez/.k/runtimes/kre-mono.1.0.0-rc1-final
/Users/irperez/.k/packages/KRE-Mono.1.0.0-rc1-final
/Users/irperez/.kre/runtimes/dnx-mono.1.0.0-rc1-final
/Users/irperez/.kre/runtimes/kre-mono.1.0.0-rc1-final
/Users/irperez/.kre/packages/KRE-Mono.1.0.0-rc1-final.
Visit https://github.com/aspnet/Home for an installation guide.

[INFORMATION:OmniSharp.Dnx.DnxProjectSystem] No default runtime found
[INFORMATION:OmniSharp.Startup] Solution has finished loading
[INFORMATION:OmniSharp.ScriptCs.ScriptCsProjectSystem] Could not find any CSX files
[ERROR:OmniSharp.Dnx.DnxPaths] The specified runtime path '1.0.0-rc1-final' does not exist. Searched locations /Users/irperez/.dnx/runtimes/dnx-mono.1.0.0-rc1-final
/Users/irperez/.dnx/runtimes/kre-mono.1.0.0-rc1-final
/Users/irperez/.dnx/packages/KRE-Mono.1.0.0-rc1-final
/Users/irperez/.k/runtimes/dnx-mono.1.0.0-rc1-final
/Users/irperez/.k/runtimes/kre-mono.1.0.0-rc1-final
/Users/irperez/.k/packages/KRE-Mono.1.0.0-rc1-final
/Users/irperez/.kre/runtimes/dnx-mono.1.0.0-rc1-final
/Users/irperez/.kre/runtimes/kre-mono.1.0.0-rc1-final
/Users/irperez/.kre/packages/KRE-Mono.1.0.0-rc1-final.
Visit https://github.com/aspnet/Home for an installation guide.
[INFO] Starting OmniSharp at '/Users/irperez/Repos/dotnet5/webAPI'...
[INFO] Started OmniSharp from '/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/csharp-o/bin/omnisharp' with process id 2518...
[INFORMATION:OmniSharp.Startup] Omnisharp server running using stdio at location '/Users/irperez/Repos/dotnet5/webAPI' on host 2434.
[INFORMATION:OmniSharp.Dnx.DnxProjectSystem] Found project '/Users/irperez/Repos/dotnet5/webAPI/project.json'.
[INFORMATION:OmniSharp.Dnx.DnxProjectSystem] No default runtime found
[INFORMATION:OmniSharp.Dnx.DnxPaths] Looking for sdk version in '/Users/irperez/Repos/dotnet5/global.json'.
/Users/irperez/Repos/dotnet5/global.json(4,37)
The specified runtime path '1.0.0-rc1-final' does not exist. Searched locations /Users/irperez/.dnx/runtimes/dnx-mono.1.0.0-rc1-final
/Users/irperez/.dnx/runtimes/kre-mono.1.0.0-rc1-final
/Users/irperez/.dnx/packages/KRE-Mono.1.0.0-rc1-final
/Users/irperez/.k/runtimes/dnx-mono.1.0.0-rc1-final
/Users/irperez/.k/runtimes/kre-mono.1.0.0-rc1-final
/Users/irperez/.k/packages/KRE-Mono.1.0.0-rc1-final
/Users/irperez/.kre/runtimes/dnx-mono.1.0.0-rc1-final
/Users/irperez/.kre/runtimes/kre-mono.1.0.0-rc1-final
/Users/irperez/.kre/packages/KRE-Mono.1.0.0-rc1-final.
Visit https://github.com/aspnet/Home for an installation guide.

[INFORMATION:OmniSharp.ScriptCs.ScriptCsProjectSystem] Detecting CSX files in '/Users/irperez/Repos/dotnet5/webAPI'.
[INFORMATION:OmniSharp.ScriptCs.ScriptCsProjectSystem] Could not find any CSX files
[INFORMATION:OmniSharp.Startup] Solution has finished loading
[INFORMATION:OmniSharp.MSBuild.MSBuildProjectSystem] No solution files found in '/Users/irperez/Repos/dotnet5/webAPI'
[ERROR:OmniSharp.Dnx.DnxPaths] The specified runtime path '1.0.0-rc1-final' does not exist. Searched locations /Users/irperez/.dnx/runtimes/dnx-mono.1.0.0-rc1-final
/Users/irperez/.dnx/runtimes/kre-mono.1.0.0-rc1-final
/Users/irperez/.dnx/packages/KRE-Mono.1.0.0-rc1-final
/Users/irperez/.k/runtimes/dnx-mono.1.0.0-rc1-final
/Users/irperez/.k/runtimes/kre-mono.1.0.0-rc1-final
/Users/irperez/.k/packages/KRE-Mono.1.0.0-rc1-final
/Users/irperez/.kre/runtimes/dnx-mono.1.0.0-rc1-final
/Users/irperez/.kre/runtimes/kre-mono.1.0.0-rc1-final
/Users/irperez/.kre/packages/KRE-Mono.1.0.0-rc1-final.
Visit https://github.com/aspnet/Home for an installation guide.
[INFORMATION:OmniSharp.Dnx.DnxProjectSystem] Scanning '/Users/irperez/Repos/dotnet5/webAPI' for DNX projects

@seandjones
Copy link

Same issue here with a different runtime path:

[ERROR:OmniSharp.Dnx.DnxPaths] The specified runtime path 'default' does not exist. Searched locations /Users/seanjones/.dnx/runtimes/dnx-coreclr-darwin-x64.1.0.0-rc1-final
/Users/seanjones/.dnx/runtimes/dnx-coreclr-darwin-x64.1.0.0-rc1-final
/Users/seanjones/.dnx/packages/dnx-coreclr-darwin-x64.1.0.0-rc1-final
/Users/seanjones/.k/runtimes/dnx-mono.default
/Users/seanjones/.k/runtimes/kre-mono.default
/Users/seanjones/.k/packages/KRE-Mono.default
/Users/seanjones/.kre/runtimes/dnx-mono.default
/Users/seanjones/.kre/runtimes/kre-mono.default
/Users/seanjones/.kre/packages/KRE-Mono.default.
Visit https://github.com/aspnet/Home for an installation guide.
[INFORMATION:OmniSharp.Dnx.DnxProjectSystem] No default runtime found
The specified runtime path 'default' does not exist. Searched locations /Users/seanjones/.dnx/runtimes/dnx-coreclr-darwin-x64.1.0.0-rc1-final
/Users/seanjones/.dnx/runtimes/dnx-coreclr-darwin-x64.1.0.0-rc1-final
/Users/seanjones/.dnx/packages/dnx-coreclr-darwin-x64.1.0.0-rc1-final
/Users/seanjones/.k/runtimes/dnx-mono.default
/Users/seanjones/.k/runtimes/kre-mono.default
/Users/seanjones/.k/packages/KRE-Mono.default
/Users/seanjones/.kre/runtimes/dnx-mono.default
/Users/seanjones/.kre/runtimes/kre-mono.default
/Users/seanjones/.kre/packages/KRE-Mono.default.
Visit https://github.com/aspnet/Home for an installation guide.

@pheuter
Copy link

pheuter commented Nov 19, 2015

Same, still looking for runtime location in home directory when new rc-1 installer installed it in /usr/local/lib/dnx/runtimes

@pheuter
Copy link

pheuter commented Nov 19, 2015

Even trying to run update-self results in confusion around where it's located:

$ dnvm update-self
~/.dnx/dnvm/dnvm.sh doesn't exist. This command assumes you have installed dnvm in the usual location and are trying to update it. If you want to use update-self then dnvm.sh should be sourced from ~/.dnx/dnvm. dnvm is currently sourced from /usr/local/lib/dnx/bin/dnvm.sh

@pheuter
Copy link

pheuter commented Nov 19, 2015

Also, when specifying a version to use, it creates the ~/.dnx dir with an alias and runtimes, but runtimes is empty.

@jrieken
Copy link
Member

jrieken commented Nov 19, 2015

@pheuter What does dnvm list print?

@franzsilva
Copy link
Author

screen shot 2015-11-19 at 10 30 27 a m

@jrieken
Copy link
Member

jrieken commented Nov 19, 2015

That at least explains why restore wants to run with mono. There is a hack on OmniSharp that always uses mono in favour of coreclr because that doesn't support sockets - which OmniSharp and DTH need.

@jrieken
Copy link
Member

jrieken commented Nov 19, 2015

Also, the OmniSharp log should print more details about the exact DNX version it picked, Use Cmd+L,L to show

@pheuter
Copy link

pheuter commented Nov 19, 2015

@jrieken Mine looks a bit different, I only have 1.0.0-rc1-final installed and the default is set to mono.

@mykebates
Copy link

I have swapped between mono and coreclr and still get the issue

screen shot 2015-11-19 at 9 59 24 am

@irperez
Copy link

irperez commented Nov 19, 2015

I removed mono and only have Core CLR installed 1.0.0-rc1-final, and am still having the same issue. Mac development is pretty much unusable at this point.

@irperez
Copy link

irperez commented Nov 19, 2015

Here is my list

dnvm

@ardacetinkaya
Copy link

I have the same error.

screen shot 2015-11-19 at 10 12 48 pm

/Users/Arda/.dnx/runtimes/dnx-coreclr-darwin-x64.1.0.0-rc1-final
/Users/Arda/.dnx/runtimes/dnx-coreclr-darwin-x64.1.0.0-rc1-final
/Users/Arda/.dnx/packages/dnx-coreclr-darwin-x64.1.0.0-rc1-final
/Users/Arda/.k/runtimes/dnx-mono.default
/Users/Arda/.k/runtimes/kre-mono.default
/Users/Arda/.k/packages/KRE-Mono.default
/Users/Arda/.kre/runtimes/dnx-mono.default
/Users/Arda/.kre/runtimes/kre-mono.default
/Users/Arda/.kre/packages/KRE-Mono.default.

dnvm list and other dnx commands works fine, even I can run the application from terminal. But in VSCode, I got this error.

@offgriddev
Copy link

Same error here:
[INFORMATION:OmniSharp.Startup] Omnisharp server running using stdio at location '/Users/jranderson/workspace/dot-net-apps/AspNet5Mac' on host 49392.
[ERROR:OmniSharp.Dnx.DnxPaths] The specified runtime path 'default' does not exist. Searched locations /Users/jranderson/.dnx/runtimes/dnx-coreclr-darwin-x64.1.0.0-rc1-final
/Users/jranderson/.dnx/runtimes/dnx-coreclr-darwin-x64.1.0.0-rc1-final
/Users/jranderson/.dnx/packages/dnx-coreclr-darwin-x64.1.0.0-rc1-final
/Users/jranderson/.k/runtimes/dnx-mono.default
/Users/jranderson/.k/runtimes/kre-mono.default
/Users/jranderson/.k/packages/KRE-Mono.default
/Users/jranderson/.kre/runtimes/dnx-mono.default
/Users/jranderson/.kre/runtimes/kre-mono.default
/Users/jranderson/.kre/packages/KRE-Mono.default.
Visit https://github.com/aspnet/Home for an installation guide.

Running on Mac OS X 10.11.1

@xagabi
Copy link

xagabi commented Nov 21, 2015

I have the same error. :(

@CelsoSantos
Copy link

I actually have problems with OmniSharp as well but not regarding the paths but rather with DesignTimeHostManager.

Here's the Omnisharp Log:

[INFO] Starting OmniSharp at '/Users/Zed/ttest/VSCode_Test'...
[INFO] Started OmniSharp from '/Applications/Visual Studio     Code.app/Contents/Resources/app/extensions/csharp-o/bin/omnisharp' with process id 43072...
[INFORMATION:OmniSharp.Startup] Omnisharp server running using stdio at location '/Users/Zed/ttest/VSCode_Test' on host 39900.
[INFORMATION:OmniSharp.Dnx.DnxPaths] Using runtime '/Users/Zed/.kre/packages/KRE-Mono.1.0.0-alpha4'.
[INFORMATION:OmniSharp.Dnx.DnxProjectSystem] Scanning '/Users/Zed/ttest/VSCode_Test' for DNX projects
[INFORMATION:OmniSharp.Dnx.DnxProjectSystem] Found project '/Users/Zed/ttest/VSCode_Test/project.json'.
[ERROR:OmniSharp.Dnx.DesignTimeHostManager] Failed to launch DesignTimeHost in a timely fashion.
[ERROR] Error: Failed to start OmniSharp

Node.JS, NPM, Visual Studio Code and .NET 5.0 were all installed today but DNX commands inside VSCode don't run, claiming that OmniSharp server is not running.

Also, here's my dnvm list output:
Active Version Runtime Architecture OperatingSystem Alias


   1.0.0-beta4          mono                 linux/osx
   1.0.0-beta7          coreclr x64          darwin
   1.0.0-beta7          mono                 linux/osx
   1.0.0-rc1-final      clr     x64          win
   1.0.0-rc1-final      clr     x86          win
*    1.0.0-rc1-final      coreclr x64          darwin          default
   1.0.0-rc1-final      coreclr x64          linux
   1.0.0-rc1-final      coreclr x64          win
   1.0.0-rc1-final      coreclr x86          win
   1.0.0-rc1-final      mono                 linux/osx

@ersintarhan
Copy link

Same problem for me...

[INFORMATION:OmniSharp.ScriptCs.ScriptCsProjectSystem] Detecting CSX files in '/Users/ersintarhan/Desktop/WebApplicationBasic'.
[ERROR:OmniSharp.Dnx.DnxPaths] The specified runtime path 'default' does not exist. Searched locations /Users/ersintarhan/.dnx/runtimes/dnx-coreclr-darwin-x64.1.0.0-rc1-final
/Users/ersintarhan/.dnx/runtimes/dnx-coreclr-darwin-x64.1.0.0-rc1-final
/Users/ersintarhan/.dnx/packages/dnx-coreclr-darwin-x64.1.0.0-rc1-final
/Users/ersintarhan/.k/runtimes/dnx-mono.default
/Users/ersintarhan/.k/runtimes/kre-mono.default
/Users/ersintarhan/.k/packages/KRE-Mono.default
/Users/ersintarhan/.kre/runtimes/dnx-mono.default
/Users/ersintarhan/.kre/runtimes/kre-mono.default
/Users/ersintarhan/.kre/packages/KRE-Mono.default.

dnvm list output --->

Active Version              Runtime Architecture OperatingSystem Alias
------ -------              ------- ------------ --------------- -----
       1.0.0-rc1-final      clr     x64          win             
       1.0.0-rc1-final      clr     x86          win             
  *    1.0.0-rc1-final      coreclr x64          darwin          default
       1.0.0-rc1-final      coreclr x64          linux           
       1.0.0-rc1-final      coreclr x64          win             
       1.0.0-rc1-final      coreclr x86          win             
       1.0.0-rc1-final      mono                 linux/osx       

@cwensley
Copy link

It appears #471 is a duplicate of this issue. It has a workaround that worked for me by creating a symbolic link of the /usr/local/lib/dnx/runtimes folder to ~/.dnx/runtimes

@danlofquist
Copy link

Get the same problem

[ERROR:OmniSharp.Dnx.DnxPaths] The specified runtime path 'default' does not exist. Searched locations /Users/Dan/.dnx/runtimes/dnx-coreclr-darwin-x64.1.0.0-rc1-final
/Users/dan/.dnx/runtimes/dnx-coreclr-darwin-x64.1.0.0-rc1-final
/Users/dan/.dnx/packages/dnx-coreclr-darwin-x64.1.0.0-rc1-final
/Users/dan/.k/runtimes/dnx-mono.default
/Users/dan/.k/runtimes/kre-mono.default
/Users/dan/.k/packages/KRE-Mono.default
/Users/dan/.kre/runtimes/dnx-mono.default
/Users/dan/.kre/runtimes/kre-mono.default
/Users/dan/.kre/packages/KRE-Mono.default.
~  ᐅ dnvm list -detailed

Active              Version Runtime Architecture OperatingSystem Alias Location
------              ------- ------- ------------ --------------- ----- --------
     *      1.0.0-rc1-final coreclr          x64          darwin default /usr/local/lib/dnx/runtimes
            1.0.0-rc1-final    mono                    linux/osx       /usr/local/lib/dnx/runtimes

@neilyoung
Copy link

Same problem. It sucks

INFORMATION:OmniSharp.Dnx.DnxProjectSystem] No default runtime found
The specified runtime path 'default' does not exist. Searched locations /Users/decades/.dnx/runtimes/dnx-mono.1.0.0-rc1-final
/Users/decades/.dnx/runtimes/dnx-mono.1.0.0-rc1-final
/Users/decades/.dnx/packages/dnx-mono.1.0.0-rc1-final
/Users/decades/.k/runtimes/dnx-mono.default
/Users/decades/.k/runtimes/kre-mono.default
/Users/decades/.k/packages/KRE-Mono.default
/Users/decades/.kre/runtimes/dnx-mono.default
/Users/decades/.kre/runtimes/kre-mono.default
/Users/decades/.kre/packages/KRE-Mono.default.
Visit https://github.com/aspnet/Home for an installation guide.

@donmurta
Copy link

Check cwensley's solution - no need to be blocked when there is a simple workaround until this is fixed properly.

Basically had to delete the runtimes directory in .dnx then

ln -s /usr/local/lib/dnx/runtimes ~/.dnx/

or something pretty close to that.

@neilyoung
Copy link

@donmurta: Exactly, found it out right a minute ago.

@phillijw
Copy link

What I've been doing as a temp fix is symlinking a file from my ~/.dnx/runtimes/dnx-whatever-1.0.0-final to the /usr/local/lib/dnx/runtimes/dnx-whatever-1.0.0-final file. This is a temporary workaround but it works. It probably makes more sense to symlink the entire runtime directory, not just a specific version... I'm not deep enough yet to have realized that though :)

My osx echo $DNX_HOME gives me: /Users/phillijw/.dnx:/usr/local/lib/dnx

It is common to add multiple paths to a single environment variable via export PATH=$PATH:/path/to/my/stuff

When looking at the following code, you can see that this might cause a problem because it's looking for a path, not a path array: https://github.com/OmniSharp/omnisharp-roslyn/blob/d3d8fa360cd70c7806ae52e0f318f5e76791abd0/src/OmniSharp.Dnx/DnxPaths.cs#L133

That gets called from here: https://github.com/OmniSharp/omnisharp-roslyn/blob/d3d8fa360cd70c7806ae52e0f318f5e76791abd0/src/OmniSharp.Dnx/DnxPaths.cs#L51

That calls this: https://github.com/OmniSharp/omnisharp-roslyn/blob/d3d8fa360cd70c7806ae52e0f318f5e76791abd0/src/OmniSharp.Dnx/DnxPaths.cs#L51

etc... nowhere in there is it tokenizing the $DNX_HOME value which may be part of the problem in my case. I've seen that others don't even have the /usr/local/lib/dnx folder in their $DNX_HOME at all. I honestly don't remember if I added mine by hand or if something put it there for me.

@phillijw
Copy link

When I use the mono c# REPL by running the csharp command:

csharp> Environment.GetEnvironmentVariable("DNX_HOME")
null
csharp>

@danlofquist
Copy link

It seems like OmniSharp is unable to read from globally installed runtimes. Out of the box dnvm package installation installs the runtimes in the global location.

ᐅ dnvm list -detailed

Active              Version Runtime Architecture OperatingSystem Alias Location
------              ------- ------- ------------ --------------- ----- --------
            1.0.0-rc1-final coreclr          x64          darwin default /usr/local/lib/dnx/runtimes
            1.0.0-rc1-final    mono                    linux/osx       /usr/local/lib/dnx/runtimes

Instead of symlink you can uninstall the ones in the global location, and reinstall them in the user location.

ᐅ dnvm uninstall 1.0.0-rc1-final -r coreclr
ᐅ dnvm uninstall 1.0.0-rc1-final -r mono

and then install them to the user location. flag -g installs them globally btw.

ᐅ dnvm install latest -r coreclr
ᐅ dnvm install latest -r mono

That will give you

ᐅ dnvm list -detailed

Active              Version Runtime Architecture OperatingSystem Alias Location
------              ------- ------- ------------ --------------- ----- --------
     *      1.0.0-rc1-final coreclr          x64          darwin default ~/.dnx/runtimes
            1.0.0-rc1-final    mono                    linux/osx       ~/.dnx/runtimes

and everything will work as intended.

@crunchie84
Copy link

Above comment of @danlofquist did the trick! 👍

@neilyoung
Copy link

How :)? With that kind of typo?

ᐅ dmvm uninstall 1.0.0-rc1-final -r coreclr
ᐅ dmvm uninstall 1.0.0-rc1-final -r mono

However, even with corrected version it doesn't do it for me, because the re-install put it back go global location

PS: Now everything is messed up again...

@peterblazejewicz
Copy link

@neilyoung
Try this uninstall, I've the same problem when first trying @danlofquist solution. I've added -y option:

ᐅ dnvm uninstall 1.0.0-rc1-final -r coreclr -y
ᐅ dnvm uninstall 1.0.0-rc1-final -r mono -y

Then verify there is no dnvm runtimes:

dnvm list
No runtimes installed. You can run `dnvm install latest` or `dnvm upgrade` to install a runtime.

Then install:

dnvm install latest -r coreclr
Determining latest version
Latest version is 1.0.0-rc1-final 
Downloading dnx-coreclr-darwin-x64.1.0.0-rc1-final from https://www.nuget.org/api/v2
Download: https://www.nuget.org/api/v2/package/dnx-coreclr-darwin-x64/1.0.0-rc1-final
######################################################################## 100.0%
Installing to /Users/piotrblazejewicz/.dnx/runtimes/dnx-coreclr-darwin-x64.1.0.0-rc1-final
Adding /Users/piotrblazejewicz/.dnx/runtimes/dnx-coreclr-darwin-x64.1.0.0-rc1-final/bin to process PATH
dnvm install latest -r mono
Determining latest version
Latest version is 1.0.0-rc1-final 
Downloading dnx-mono.1.0.0-rc1-final from https://www.nuget.org/api/v2
Download: https://www.nuget.org/api/v2/package/dnx-mono/1.0.0-rc1-final
######################################################################## 100.0%
Installing to /Users/piotrblazejewicz/.dnx/runtimes/dnx-mono.1.0.0-rc1-final
runtime=mono
Adding /Users/piotrblazejewicz/.dnx/runtimes/dnx-mono.1.0.0-rc1-final/bin to process PATH

IMPORTANT
Then make sure the default runtime is set with -p option:

dnvm use -r mono -p 1.0.0-rc1-final
Adding /Users/piotrblazejewicz/.dnx/runtimes/dnx-mono.1.0.0-rc1-final/bin to process PATH
Setting alias 'default' to 'dnx-mono.1.0.0-rc1-final'

Only after that I've got VSCode output:

[INFO] Starting OmniSharp at '/Users/piotrblazejewicz/development/WebApplicationBasic'...
[INFO] Started OmniSharp from '/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/csharp-o/bin/omnisharp' with process id 50235...
[INFORMATION:OmniSharp.Startup] Omnisharp server running using stdio at location '/Users/piotrblazejewicz/development/WebApplicationBasic' on host 50227.
[INFORMATION:OmniSharp.Dnx.DnxPaths] Using runtime '/Users/piotrblazejewicz/.dnx/runtimes/dnx-mono.1.0.0-rc1-final'.
[INFORMATION:OmniSharp.Dnx.DnxProjectSystem] Scanning '/Users/piotrblazejewicz/development/WebApplicationBasic' for DNX projects
[INFORMATION:OmniSharp.Dnx.DnxProjectSystem] Found project '/Users/piotrblazejewicz/development/WebApplicationBasic/project.json'.
Process ID 50243
Listening on port 55205
[INFORMATION:OmniSharp.Dnx.DesignTimeHostManager] Running DesignTimeHost on port 55205, with PID 50243
Client accepted 127.0.0.1:55205
Client accepted 127.0.0.1:55205
[INFORMATION:OmniSharp.Dnx.DnxProjectSystem] Connected
[INFORMATION:OmniSharp.MSBuild.MSBuildProjectSystem] No solution files found in '/Users/piotrblazejewicz/development/WebApplicationBasic'
[INFORMATION:OmniSharp.ScriptCs.ScriptCsProjectSystem] Detecting CSX files in '/Users/piotrblazejewicz/development/WebApplicationBasic'.
[INFORMATION:OmniSharp.ScriptCs.ScriptCsProjectSystem] Could not find any CSX files
[INFORMATION:OmniSharp.Startup] Solution has finished loading

thanks!

@neilyoung
Copy link

@peterblazejewicz: Thanks. Indeed, this does the job. But -y is completely unrelated, isn't it?

@peterblazejewicz
Copy link

@neilyoung
No idea. It magically worked for me.
For reference about the option:

-y                          Assume Yes to all queries and do not prompt

@MrDustpan
Copy link

Thank you @peterblazejewicz, that worked for me as well. I've been pulling my hair out all day trying to get this working!

@neilyoung
Copy link

I think -p is the key. I used that "use" command before, but never with -p. And OmniSharp complained about having not seen a "default" entry. So the alias "default" was never set. Instead an asterisk was shown in the first column of "dnvm list", which let me assume to have set the default runtime properly.

@chemitaxis
Copy link

@danlofquist unistall and reinstall solved my problem :)

@gabrielgasnot
Copy link

@danlofquist thank you ! uninstall/reinstall solved my problem too. I can go back to work now :)

@egamma egamma modified the milestone: Backlog Dec 10, 2015
@flq
Copy link

flq commented Dec 13, 2015

I wish one could upvote comments. @danlofquist 's solution is clean and makes OmniSharp work in VS Code - thank you! 👍

@egamma egamma added bug Issue identified by VS Code Team member as probable bug c# labels Dec 14, 2015
@egamma
Copy link
Member

egamma commented Dec 14, 2015

@flq then let's close the issue with a link to the comment from @danlofquist. It addresses the issue.

@egamma egamma closed this as completed Dec 14, 2015
@p-i-
Copy link

p-i- commented Jan 15, 2016

@danlofquist, I'm trying to follow your instructions as I have this problem on OSX. dnvm list gives "-bash: dnvm: command not found" ... What to do?

@dptole
Copy link

dptole commented Feb 21, 2016

@p-i- try to follow this tutorial https://azure.microsoft.com/en-us/documentation/articles/web-sites-create-web-app-using-vscode/ but you are probably going to get stuck at some point too. Good luck.

@xtianus79
Copy link

@peterblazejewicz @neilyoung Thanks for the help. However, I would recommend that this issue perhaps be reopened because upon doing an update by the system to C# as an extension it threw everything out of wack.

I uninstalled and reinstalled repeatedly not figuring out what the issue was.

not until i did the -p for the default library runtime did the application then proceed to work.

Thanks for the help as always.

@bmvr
Copy link

bmvr commented Mar 25, 2016

Guys I'm still having the same problem. I've tried all the answer you gave and still can't run dnx:restore from VScode.
this is what i got from dnvm list -detailed

Active Version              Runtime Architecture OperatingSystem Alias Location
      * 1.0.0-rc1-update1    coreclr x64          darwin          default ~/.dnx/runtimes
       1.0.0-rc1-update1    mono                 linux/osx             ~/.dnx/runtimes

@cevarief
Copy link

it's 2016 and that issue still happens.

Uninstall and install both runtimes does not make it. Following @peterblazejewicz tips using -y works like charm.

Looks like uninstall using -y does not ask for confirmation.

Thanks a lot.

@egamma
Copy link
Member

egamma commented Mar 26, 2016

// fyi @DustinCampbell

@danguilherme
Copy link

After using @danlofquist and @peterblazejewicz solutions, I had to reinstall VS Code C# extension to get it working. Thanks!

@bpasero bpasero removed the bug Issue identified by VS Code Team member as probable bug label Jul 1, 2016
@vscodebot vscodebot bot locked and limited conversation to collaborators Nov 18, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests