问题
I am wondering if anyone can help me, I did a fresh install of MonoDevelop on a fresh install of Ubuntu 18.04.2 LTS with .NET Core 2.2 installed (everything updated), then followed the instructions layed out at Mono Download Offical. I have no errors or warnings during installation.
When I create any type of project or open one, all the system namespaces are missing?
I have checked here:
And
When I build / Clean any project I get:
/home/ant/.cache/MonoDevelop/7.0/MSBuild/27259_1/Microsoft.CSharp.CurrentVersion.targets(5,5): Error MSB4019: The imported project "/home/ant/.cache/MonoDevelop/7.0/MSBuild/27259_1//Microsoft.CSharp.Core.targets" was not found. Confirm that the path in the declaration is correct, and that the file exists on disk. (MSB4019) (sadsad)
Error
回答1:
I solved it temporarily: I went to the Namespace/Class options and under Run - Default - Advanced I selected Execute in .NET runtime -> Mono 5.20.1.34 It fixes the problem until i restart Monodevelop. I'm having this problem since this morning, even after a fresh reinstall. I am using Ubuntu MATE 18.04
回答2:
This was a problem with mono its self, mono updated and was using a different version of MsBuild which the IDE could not use/understand. So I pulled the preview repository, as they added a fix there.
To fix:
purge monodevelop and mono-devel (with others) and install from here Preview - Stable until they patch the normal repository
来源:https://stackoverflow.com/questions/57073242/system-namespaces-missing-monodevelop-on-fresh-install