-
Notifications
You must be signed in to change notification settings - Fork 655
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Omnisharp.msbuild.projectmanager - failed to load project file - no IntelliSense #3049
Comments
The reported issue is also perceived with slightly different environment settings. Sharing a summarized version just with the environment differences, in case it helps, to avoid opening a separate issue for what appears to be the same problem. Thank you very much.
VSCode version: 1.33.1 Mono InformationOmniSharp using global mono :5.18.0Dotnet Information.NET Core SDK (reflecting any global.json): Version: 2.2.203 Commit: e5bab63ecaRuntime Environment: Host (useful for support): .NET Core SDKs installed: |
This started happening on my development environment too.
|
@solrevdev and @hiranya911, just in case you or someone else that view this issue have to do some work that cannot be done otherwise and you have the option of switching to a different operating system, the extension works properly on a fresh install that I've made on my home computer with the environment settings below. Operating System: Fedora Workstation 30 x86_64 In any rate, let's wait for an answer of one of the project mantainers, but maybe the issue isn't related to the extension itself, but with some dependency on which the extension relies, on my work computer the issue started after upgrading from Ubuntu 18.04.2 LTS to Ubuntu 19.04. While investigating the issue I've found out the |
Thanks @danieldeveloper001. I'm currently using the same exact versions as you (except it's a different flavor of Linux based on Debian). I've tried re-installing the extension a couple of times to no avail. As you said it might be due to a system dependency.
Yes, I've observed the same in my environment. For now I can continue my work on my Mac. But I'd love to return to my Linux workstation soon :) |
So, working without IntelliSense was getting too much for me so I decided to re-install Mono to see if that would add the missing file that seems to be at least part of the exception I was getting. Running this from my terminal seems to fix it for me. 🎉 sudo apt install gnupg ca-certificates
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF
echo "deb https://download.mono-project.com/repo/ubuntu stable-bionic main" | sudo tee /etc/apt/sources.list.d/mono-official-stable.list
sudo apt update
sudo apt install mono-devel
I will leave the bug open however as others have had the same issue my fix may not even have anything to do with re-installing mono 🤷♂️ |
@solrevdev Which version of mono-devel did you install? I just upgraded to ubuntu 19.04 and I get these errors. My mono-devel is |
I ran the instructions from the 18.04 version from the mono project page mono-devel: apt info mono-devel
Package: mono-devel
Version: 5.20.1.19-0xamarin2+ubuntu1804b1
Priority: optional
Section: cli-mono
Source: mono
Maintainer: Debian Mono Group <pkg-mono-group@lists.alioth.debian.org>
Installed-Size: 105 MB mono version: mono --version
Mono JIT compiler version 5.20.1.19 (tarball Thu Apr 11 09:02:17 UTC 2019)
Copyright (C) 2002-2014 Novell, Inc, Xamarin Inc and Contributors. www.mono-project.com
TLS: __thread
SIGSEGV: altstack
Notifications: epoll
Architecture: amd64
Disabled: none
Misc: softdebug
Interpreter: yes
LLVM: yes(600)
Suspend: hybrid
GC: sgen (concurrent by default)
|
Yeah that helped, thanks! There was a difference between the mono installed by vscode/omnisharp and the one from the official repo. The official version fixed it. |
I’ve just read a similar issue that suggests that omnisharp shouldn’t be using the msbuild assets from mono and should be using the dotnet sdk version instead. That makes sense to me. So reinstalling mono while apparently working may not be the top solution. I may try using this command at some point but for now as I said everything seems to work ok. HTH |
I agree it's not perfect... but after so much downtime, I'm just glad I got the tools to work. Everything on linux is difficult or buggy, so I'm just happy to get back to coding. Thanks again for your help. |
@lonix1, keep in mind that many open source projects are maintained by nice teams that choose to make their code open source (and often free) instead closed source (and often paid) model and yet they do such awesome and valuable tools 😉 Even though your frustration is understandable, statements such as "everything on linux is difficult or buggy" can be a little bit harsh on the project mantainers (and on the Linux project mantainers itself). Please, do not read this as if it was intended to be disrespectful or something, because it is really not 🙂 Best regards. |
@danieldeveloper001 If it was not meant to be disrespectful then you should not have said it. 😉 The Microsoft guys are big boys, they can defend themselves. It didn't cross my mind for one moment that my comment could have been misconstrued as an attack on the Microsoft people, who are giving us (great) software for free. It was a general comment, borne of frustration, and accurate... and I repeat, "everything in linux is difficult or buggy". I choose to use linux anyway for various reasons. People are so touchy these days, sheesh. Best regards. |
Hey all, sorry for the delay in response here. It sounds like folks were able to unblock themselves by installing mono/mono-devel for their respective distributions? |
@rchande Yes, I'm all good now thanks. One quick question though. Is the correct behaviour to look for mono assets such as the missing "mono/xbuild/15.0/Microsoft.Common.props" file or should it be looking at a donetcore sdk path? I only ask because I read it elsewhere as a fix for the issue. Otherwise, all is good and I'll close this issue if that helps. |
@rchande Yes, thanks I'm good too. Official |
@rchande, unblocked, not by manually upgrading mono but by switching to another computer with a distribution that possibly packages a working version of mono - and that's fine to me, thank you for your time and attention to this issue! @solrevdev pointed out and it is also a doubt of mine, is it the correct behaviour - look for mono - or should it look just for dotnetcore? |
You could also try setting omnisharp.useGlobalMono: never. This way you will always use the mono that is shipped with omnisharp and is supposed to have all the right bits in place. @danieldeveloper001 Since omnisharp needs to support dotnet framework projects as well, we cannot easily switch to dotnet core and hence on Linux we need a mono installation. |
For anyone hitting the issue please update mono or try the setting as mentioned in the above comment. I will close this issue for now. Please reopen if it reoccurs. |
I'm stuck on this issue with Ubuntu 19.04. I tried setting omnisharp.useGlobalMono: never (for those wondering where you do this, there is a setting in VS Code.) Did not help. I tried complete uninstalling and reinstalling Mono. That didn't help either. What worked for me was installing VS code from this Microsoft site: https://code.visualstudio.com/docs/setup/linux Do not install from the snap store, that will just put you right back into this problem. Instead, scroll down to "Debian and Ubuntu based distributions", and install from the supplied .deb file. Ok, this bugged me, so I kept going to figure out what the problem was for dotnet installed from the Ubuntu repositories. I found that making the following change corrected the problem. In /usr/share/dotnet/sdk/2.2.301/Sdks/Microsoft.NET.Sdk/Sdk/Sdk.props: The original produces "The imported project "/usr/lib/mono/xbuild/15.0/Microsoft.Common.props" was not found." which is true that file does not exist. But OmniSharp should not be trying to use that path, since I instructed it (via Settings) to UseGlobalMono=Never. Since I could not reopen this current issue, I created a new one to address this issue with OmniSharp |
I'm having the same issue, I think it's because the conflict between dotnet core and mono, after I uninstalled mono related packages, every thing goes well, I'm using archlinux, so you can try sudo pacman -R mono mono-tools gtk-sharp-2 msbuild-stable fsharp |
@guy-rouillier's solution worked for me as well. Thanks 👍 |
This is valid workaround, thank you man! |
`Starting OmniSharp server at 5/2/2021, 5:20:45 pm OmniSharp server started Starting OmniSharp on Windows 6.2.9200.0 (x64) Attempted to update project that is not loaded: c:\Users\This PC\Documents\VS Code - Programs!\csharp\csharp.csproj THIS IS FRUSTATING. PLEASE ANYBODY HELP. |
noobshubham, just a guess, but position 84 is the 's' in "This PC" in "exists('c:\Users\This PC.vscode\extensions". Perhaps the space in the path is messing it up. Try using the 8.3 compatible version of the path and see if that helps. Use "dir /x" to determine that. |
Thanks for the reply Sir. but i think i'm getting error in C# extension, because it isn't able to generate assests for it! |
@noobshubham this solution worked for me. Did you try it? It's in the same Github issue thread. You need to locate the file
Try renaming your directory |
Issue Type: Bug
Steps
To recreate create a new console app and open vscode or vscode insiders and view the output window for errors.
System Info
Output window
VS Code version: Code - Insiders 1.34.0-insider (473af338e1bd9ad4d9853933da1cd9d5d9e07dc9, 2019-05-01T05:15:04.403Z)
OS version: Linux x64 5.0.0-13-generic
System Info
checker_imaging: disabled_off
flash_3d: enabled
flash_stage3d: enabled
flash_stage3d_baseline: enabled
gpu_compositing: enabled
multiple_raster_threads: enabled_on
native_gpu_memory_buffers: disabled_software
rasterization: disabled_software
surface_synchronization: enabled_on
video_decode: unavailable_off
webgl: enabled
webgl2: enabled
Extensions (66)
(1 theme extensions excluded)
The text was updated successfully, but these errors were encountered: