OmniSharp / omnisharp-atom

Omnisharp support for the atom editor
https://atom.io/packages/omnisharp-atom
MIT License
318 stars 61 forks source link

Trouble getting this to work with Unity #735

Open dkniffin opened 8 years ago

dkniffin commented 8 years ago

I'm trying to get autocomplete working in my unity project, in atom. I installed this plugin, and set the default editor in unity to atom. After resolving a couple other issues, I'm having trouble with this one. I've tried deleting all of my .sln files and letting Unity re-generate them, as I've seen suggested elsewhere, but it didn't help.

Here's the details:

Omnisharp-atom version: 0.29.3 Atom version: 1.7.3 Unity version: 5.3.4f1 Personal

Console output:

Starting OmniSharp server (pid:undefined)
OmniSharp Location: mono /Users/dkniffin/.atom/packages/omnisharp-atom/node_modules/omnisharp-client/omnisharp-linux-mono/OmniSharp.exe
Change the location that OmniSharp is loaded from by setting the OMNISHARP environment variable
OmniSharp Path: /Users/dkniffin/Unity/osm-game-2/osm-game-2.sln
OmniSharp: --stdio -s /Users/dkniffin/Unity/osm-game-2/osm-game-2.sln --hostPID 30024
Omnisharp server running using Stdio at location '/Users/dkniffin/Unity/osm-game-2' on host 30024.
started
Initializing in /Users/dkniffin/Unity/osm-game-2
Auto package restore: True
The project system 'DotNetProjectSystem' threw exception during initialization.
Failed to initialize Microsoft.DotNet.ProjectModel.WorkspaceContext at /Users/dkniffin/Unity/osm-game-2.
   at OmniSharp.DotNet.DotNetProjectSystem.Initalize(IConfiguration configuration)
   at OmniSharp.Startup.Configure(IApplicationBuilder app, IServiceProvider serviceProvider, IOmnisharpEnvironment env, ILoggerFactory loggerFactory, ISharedTextWriter writer, IOmnisharpAssemblyLoader loader, IOptions`1 optionsAccessor)
Configuration finished.
An unhandled exception has occurred: NuGet does not support /packagesource
/packagesource: 500 38ms
/projects: 200 67ms
/typelookup: 200 38ms
/typelookup: 200 0ms
/typelookup: 200 0ms
/codecheck: 200 15ms
/currentfilemembersasflat: 200 13ms
0
0 Projects00EventSystem.cs4:34
LinterWhitespacePull RequestsOmnisharp Atom
LFUTF-8C#master+16
ccbentlee commented 8 years ago

In my case it didn't work at all... Here is my output:

OMNISHARP OUTPUTERRORS & WARNINGS Starting OmniSharp server (pid:undefined) OmniSharp Location: mono /Users/Lee/.atom/packages/omnisharp-atom/node_modules/omnisharp-client/omnisharp-linux-mono/OmniSharp.exe Change the location that OmniSharp is loaded from by setting the OMNISHARP environment variable OmniSharp Path: /Users/Lee/Desktop/game1/game1.sln No IssuesAssets/DrawLaser.cs29:1 LFUTF-8C#develop+29

There is nothing but a zero size 'omnisharp-linux-mono.tar.gz' thing in '/Users/Lee/.atom/packages/omnisharp-atom/node_modules/omnisharp-client/omnisharp-linux-mono/'

no OmniSharp.exe kind of thing

ccbentlee commented 8 years ago

It works somehow... I delete omnisharp-atom, atom-yeoman and advanced open file. Then I re-install omnisharp-atom,it will install the other two automatically.Right click in panel,select Omnisharp->New Project(don't forget enable atom-yeoman).It works fine in this new empty project and I open my own project folder then the omnisharp-atom works well.

Here is my new output:


OMNISHARP OUTPUTERRORS & WARNINGS
Starting OmniSharp server (pid:undefined)
OmniSharp Location: mono /Users/Lee/.atom/packages/omnisharp-atom/node_modules/omnisharp-client/omnisharp-linux-mono/OmniSharp.exe
Change the location that OmniSharp is loaded from by setting the OMNISHARP environment variable
OmniSharp Path: /Users/Lee/Desktop/brainpkapp/brainpkapp.sln
OmniSharp: --stdio -s /Users/Lee/Desktop/brainpkapp/brainpkapp.sln --hostPID 1576
Omnisharp server running using Stdio at location '/Users/Lee/Desktop/brainpkapp' on host 1576.
Initializing in /Users/Lee/Desktop/brainpkapp
Auto package restore: True
Update workspace context
Resolving projects references
Detecting projects in '/Users/Lee/Desktop/brainpkapp/brainpkapp.sln'.
Loading project from '/Users/Lee/Desktop/brainpkapp/Assembly-CSharp-firstpass.csproj'.
MsBuildProjectDiagnostics
Loading project from '/Users/Lee/Desktop/brainpkapp/Assembly-CSharp.csproj'.
MsBuildProjectDiagnostics
Loading project from '/Users/Lee/Desktop/brainpkapp/Assembly-CSharp-Editor.csproj'.
ProjectAdded
ProjectAdded
MsBuildProjectDiagnostics
ProjectAdded
Detecting CSX files in '/Users/Lee/Desktop/brainpkapp'.
Could not find any CSX files
Configuration finished.
started
/projects: 200 178ms
ProjectChanged
ProjectChanged
ProjectChanged
/packagesource: 200 315ms
/highlight: 200 339ms
/highlight: 200 2939ms
/highlight: 200 3761ms
/highlight: 200 3761ms
/codecheck: 200 121ms
/codecheck: 200 7342ms
/formatafterkeystroke: 200 256ms
/autocomplete: 200 438ms
/highlight: 200 30ms
/codecheck: 200 5ms
/updatebuffer: 200 0ms
/updatebuffer: 200 0ms
/highlight: 200 4ms
/codecheck: 200 3ms
/v2/getcodeactions: 200 221ms
/updatebuffer: 200 0ms
/updatebuffer: 200 0ms
/highlight: 200 5ms
/updatebuffer: 200 0ms
/updatebuffer: 200 0ms
/codecheck: 200 4ms
/highlight: 200 5ms
/codecheck: 200 2ms
/v2/getcodeactions: 200 11ms
/updatebuffer: 200 0ms
/updatebuffer: 200 0ms
/v2/getcodeactions: 200 6ms
/highlight: 200 5ms
/codecheck: 200 2ms
0
3 Projects0162 IssuesAssets/DrawLaser.cs29:1(29, 795)
LFUTF-8C#
All
develop+29

now there are many files in '/Users/Lee/.atom/packages/omnisharp-atom/node_modules/omnisharp-client/omnisharp-linux-mono/'