Open Falconerd opened 4 years ago
3 {"Event":"log","Body":{"LogLevel":"INFORMATION","Name":"OmniSharp.MSBuild.ProjectSystem","Message":"No solution files found in '/mnt/c/Users/Dylan Falconer/dev/omnisharp-test'"},"Seq":7,"Type":"event"}
Omnisharp didn't find solution .sln file at all, and is targetting folder as a group of random .cs files. Most likely Unity didn't generate .sln and .csproj files at all. You will probably need to tweak with Unity preferences for external test editor.
On Linux, I generate my .sln
files via a script, update-solution.sh
. It calls Unity directly:
TERM="xterm" "${UNITY_PATH}" -projectPath "${PROJECT_PATH}" -batchmode -quit -nographics -logFile - -executeMethod "UnityEditor.SyncVS.SyncSolution"
You can guess what the environment variables are...
There is one slight problem in that even after I call the above, Omnisharp doesn't update. For example, if I add a file, it won't pick it up until I kill and restart the process.
Normally, Unity regenerates csproj when you add a new file, and omnisharp picks up on that. Omnisharp never changes .csproj files.
Normally, Unity regenerates csproj when you add a new file, and omnisharp picks up on that. Omnisharp never changes .csproj files.
Yes, that's exactly right. However, Omnisharp doesn't pick up on it, not until I restart it. I'll verify what's happening.
Potential failure point crossed my mind, o# relies on outside FileWatcherService (like the one in vscode), hooking into file system and sending "FileChanged" messages to omnisharp whenever any file in the directory gets changed. I don't think Omnisharp will respond on its own.
I don't think Omnisharp will respond on its own.
correct, the "change" event must be submitted by the editor
correct, the "change" event must be submitted by the editor
Thanks for the info. I'm (quickly) looking into Omnisharp for Emacs, and I don't see any "change" related event. I only see something like "updatebuffer".
We don't use a "change" event in OmniSharp-vim either, just /updateBuffer
. There is no endpoint called /change
, but there are /filesChanged
and /changeBuffer
, as well as /open
and /close
. In my experience in both .NET Core and .NET Framework, none of these are necessary. Although I'll admit to restarting the server after too many changes sometimes. I'd love a quick overview over what these endpoints do?
Hello, I have tried a few things such as removing dotnet completely, having both dotnet and mono, installing msbuild from the AUR, installing the Unity Game Engine for Arch.
I am running the Unity Game Engine on Windows and trying to use Neovim through Arch on WSL2 as my text editor.
Auto-complete works for native C# such as
List..., IEnumerator, etc
. However nothing is coming up for the unity classes.I'm unsure what else to do, any help is appreciated.
OmniSharp log