4

I open folder with existing MSBuild project (actually from VS 2012) on C# in VSCode (v. 0.10.3) under Kubuntu 15.04. OmniSharp throw error after start:

[INFO] Starting OmniSharp at '/home/tezaurismosis/Development/NET/ConsoleApp/ConsoleApp.sln'...
[INFO] Started OmniSharp from '/home/tezaurismosis/VSCode/resources/app/extensions/csharp-o/bin/omnisharp' with process id 14956...
System.InvalidOperationException: Failed to resolve the following dependencies for target framework 'DNX,Version=v4.5.1':
    framework/System.Collections 
    framework/System.Collections.Concurrent 
    framework/System.Globalization 
    framework/System.IO 
    framework/System.Net.Http.WebRequest 
    framework/System.Reflection 
    framework/System.Runtime 
    framework/System.Text.Encoding 
    framework/System.Threading.Tasks 
Searched Locations:
... some paths ...
Try running 'dnu restore'.
at Microsoft.Framework.ApplicationHost.Program.Main (System.String[] args) <0xb71f6a58 + 0x0035b> in <filename unknown>:0 
[ERROR] Error: Failed to start OmniSharp

I have installed latest version of Mono (4.2.1) and all subpackages with Mono assemblies, install dnvm and run dnvm upgrade -r mono, run dnu restore, but OmniSharp failed again and again and IntelliSence did'nt work in VSCode.

How can I fix it?

P.S. It's not ASP.NET, just console C# project.

2
  • I have a similar issue, but on Linux (debian 8). Were you able to solve this? Commented Dec 16, 2015 at 6:23
  • @Nanda, i can't. Maybe in VSCode non-ASP.NET projects not (yet) supported, i don't know. Commented Dec 20, 2015 at 0:47

1 Answer 1

4

Your versions might be out of date. Uninstall and reinstall the C# extension in vs code.

  1. Press F1, type ext show installed, press Enter. Click the x to remove it.
  2. Restart vscode.
  3. Press F1, type ext install, press Enter. Click the download icon to install.
  4. Restart vscode.

Ominsharp will now run.

Sign up to request clarification or add additional context in comments.

2 Comments

This bleeding edge stuff is cool, but sometimes painful. Thanks for the simple solution. It worked for me :)
Your answer was useful, thanks, but in the code version that I have now, after step 1. a list appears in which appears "c # for visual studio code powered by omnisharp" and clicking can be updated. Sorry for my bad english

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.