OmniSharp / omnisharp-server

HTTP wrapper around NRefactory allowing C# editor plugins to be written in any language.
http://www.omnisharp.net
MIT License
380 stars 97 forks source link

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

Open gordio opened 9 years ago

gordio commented 9 years ago

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

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

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 commented 9 years ago

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

gordio commented 9 years ago

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