Closed ebiscaia closed 2 years ago
Let's see what the log says: :OmniSharpOpenLog
Sure> Here it goes:
VIM - Vi IMproved 8.2 (2019 Dec 12, compiled Apr 18 2022 19:26:30), Included patches: 1-3995
OmniSharp server started.
Path: /home/ebisc/.cache/omnisharp-vim/omnisharp-roslyn/OmniSharp
Target: /mnt/c/Users/ebisc/Documents/Nextcloud/Programs/monogame/CannonGame/CannonGame.sln
PID: 9280
[info]: OmniSharp.Stdio.Host
Starting OmniSharp on Unknown 0.0 (Unknown)
[info]: OmniSharp.Services.DotNetCliService
Checking the 'DOTNET_ROOT' environment variable to find a .NET SDK
[info]: OmniSharp.Services.DotNetCliService
Using the 'dotnet' on the PATH.
[info]: OmniSharp.Services.DotNetCliService
DotNetPath set to dotnet
[info]: OmniSharp.MSBuild.Discovery.MSBuildLocator
Located 1 MSBuild instance(s)
1: .NET Core SDK 6.0.202 17.1.1 - "/usr/share/dotnet/sdk/6.0.202/"
[info]: OmniSharp.MSBuild.Discovery.MSBuildLocator
Registered MSBuild instance: .NET Core SDK 6.0.202 17.1.1 - "/usr/share/dotnet/sdk/6.0.202/"
[info]: OmniSharp.WorkspaceInitializer
Invoking Workspace Options Provider: OmniSharp.Roslyn.CSharp.Services.CSharpFormattingWorkspaceOptionsProvider, Order: 0
[info]: OmniSharp.MSBuild.ProjectSystem
Detecting projects in '/mnt/c/Users/ebisc/Documents/Nextcloud/Programs/monogame/CannonGame/CannonGame.sln'.
[info]: OmniSharp.MSBuild.ProjectManager
Queue project update for '/mnt/c/Users/ebisc/Documents/Nextcloud/Programs/monogame/CannonGame/CannonGame.csproj'
[info]: OmniSharp.Script.ScriptProjectSystem
Detecting CSX files in '/mnt/c/Users/ebisc/Documents/Nextcloud/Programs/monogame/CannonGame'.
[info]: OmniSharp.Script.ScriptProjectSystem
Did not find any CSX files
[info]: OmniSharp.WorkspaceInitializer
Configuration finished.
[info]: OmniSharp.Stdio.Host
Omnisharp server running using Stdio at location '/mnt/c/Users/ebisc/Documents/Nextcloud/Programs/monogame/CannonGame' on host -1.
[info]: OmniSharp.MSBuild.ProjectManager
Loading project: /mnt/c/Users/ebisc/Documents/Nextcloud/Programs/monogame/CannonGame/CannonGame.csproj [info]: OmniSharp.OmniSharpWorkspace
Miscellaneous file: /mnt/c/Users/ebisc/Documents/Nextcloud/Programs/monogame/CannonGame/Game1.cs added to workspace
Replaying requests for buffer 1
[fail]: OmniSharp.MSBuild.ProjectLoader
Windows is required to build Windows desktop applications.
[warn]: OmniSharp.MSBuild.ProjectManager
Failed to load project file /mnt/c/Users/ebisc/Documents/Nextcloud/Programs/monogame/CannonGame/CannonGame.csproj'.
All projects loaded
/mnt/c/Users/ebisc/Documents/Nextcloud/Programs/monogame/CannonGame/CannonGame.csproj
/usr/share/dotnet/sdk/6.0.202/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.Sdk.FrameworkReferenceResolution.targets(90,5): Error: Windows is required to build Windows desktop applications.
[fail]: OmniSharp.MSBuild.ProjectManager
Attempted to update project that is not loaded: /mnt/c/Users/ebisc/Documents/Nextcloud/Programs/monogame/CannonGame/CannonGame.csproj
Workspace complete: 1 project(s)
Replaying on-load requests
Ok well you can see from those [warn]
and [fail]
messages that the server isn't loading properly, presumably you can't run it from wsl2? Is it a .NET Framework project?
As I am not 100% sure about your question (I am doing this for university purposes) here is the list of packages I installed on Ubuntu:
dotnet-apphost-pack-3.1/hirsute,now 3.1.24-1 amd64 [installed,automatic]
dotnet-apphost-pack-6.0/hirsute,now 6.0.4-1 amd64 [installed,automatic]
dotnet-host/hirsute,now 6.0.4-1 amd64 [installed,automatic]
dotnet-hostfxr-3.1/hirsute,now 3.1.24-1 amd64 [installed,automatic]
dotnet-hostfxr-6.0/hirsute,now 6.0.4-1 amd64 [installed,automatic]
dotnet-runtime-3.1/hirsute,now 3.1.24-1 amd64 [installed,automatic]
dotnet-runtime-6.0/hirsute,now 6.0.4-1 amd64 [installed,automatic]
dotnet-runtime-deps-3.1/hirsute,now 3.1.24-1 amd64 [installed,automatic]
dotnet-runtime-deps-6.0/hirsute,now 6.0.4-1 amd64 [installed,automatic]
dotnet-sdk-3.1/hirsute,now 3.1.418-1 amd64 [installed]
dotnet-sdk-6.0/hirsute,now 6.0.202-1 amd64 [installed]
dotnet-targeting-pack-3.1/hirsute,now 3.1.0-1 amd64 [installed,automatic]
dotnet-targeting-pack-6.0/hirsute,now 6.0.4-1 amd64 [installed,automatic]
I tried to create an OpenGL MonoGame project under my WSL home folder to try to address the two issues pointed by the logs (the project not being written on Windows and the path lenght). Still having the same issues despite the logs seems that everything is fine).
Well seems like the problem is when I try to run monogame for Windows as I am having no issues with the openGL version. Just tried them side-by-side.
I don't think there's an error here, just a bit of confusion about where the project has been built, and where omnisharp-roslyn is running.
let g:OmniSharp_translate_cygwin_wsl = 1
in your .vimrc, although there are issues with how omnisharp-roslyn communicates with Windows from WSL2, see #706
Hi,
I have trying to work on Vim and monogame and it is being hard because everytime I try to change anything in the file, lots of errors appears on the screen.
System: Windows 10/(Ubuntu 21.10 in WSL2) Vim 8.2.4295
.vimrc
.vimplug
Thanks
Eddie