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

Unhandled Exception: System.IO.DirectoryNotFoundException: Could not find a part of the path 'C:\fake_path\config.json' #194

Open
gordio opened this issue Apr 17, 2015 · 2 comments

Comments

@gordio
Copy link

gordio commented Apr 17, 2015

It's tested only on windows, but must be problem on all platforms.

Message: OmniSharp.exe has stopped working
Plugin: OmniSharp-Sublime
Reproduce:

  • in OmniSharpSublime.sublime-settings add omnisharp_server_config_location with /User/path_dont_exist/config.json (for example)
  • Run command like C:\Windows\system32\cmd.exe /c ""C:/Users/Gordio/AppData/Roaming/Sublime Text 3/Packages/OmniSharp/PrebuiltOmniSharpServer/omnisharp.cmd" -s "C:\Users\Gordio\Development\docpad" -p 59683 -config "/Users/Gordio/dsas/config.json" --hostPID 4796"

Exception:

Unhandled Exception: System.IO.DirectoryNotFoundException: Could not find a part of the path 'C:\Users\Gordio\dsas\config.json'.
   at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
   at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, I nt32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions o ptions, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolea n useLongPath, Boolean checkHost)
   at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)
   at System.IO.StreamReader..ctor(String path, Encoding encoding, Boolean detec tEncodingFromByteOrderMarks, Int32 bufferSize, Boolean checkHost)
   at System.IO.File.InternalReadAllText(String path, Encoding encoding, Boolean checkHost)
   at OmniSharp.Configuration.ConfigurationLoader.Load(String configLocation, St ring clientMode)
   at OmniSharp.Program.StartServer(String solutionPath, String clientPathMode, Int32 port, Verbosity verbosity, String configLocation, Int32 hostPID)
   at OmniSharp.Program.Main(String[] args)

Prorosal fix: Use default config (path), with warning message.

@nosami
Copy link
Contributor

nosami commented Apr 17, 2015

Yeah... ok, that seems reasonable. Do you want to submit a PR for this?

@gordio
Copy link
Author

gordio commented Apr 17, 2015

@nosami sorry, no. I not so good in C#.

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

No branches or pull requests

2 participants