首页 > 解决方案 > 在 kali linux 2020 的 monoDevelop IDE 中找不到“/usr/lib/mono/msbuild/15.0/bin/Roslyn/Microsoft.CSharp.Core.targets”

问题描述

我是 C# 编程的新手,特别是单声道编译器和 linux 上的单声道相关的东西。当我写

using System;

namespace HelloWorld
{
    class MainClass
    {
        public static void Main(string[] args)
        {
            Console.WriteLine("Hello World!");
        }
    }
}

在单声道开发 IDE 上并点击我得到的构建按钮

/usr/lib/mono/msbuild/15.0/bin/Microsoft.CSharp.CurrentVersion.targets(5,5): Error MSB4019: The imported project 
"/usr/lib/mono/msbuild/15.0/bin/Roslyn/Microsoft.CSharp.Core.targets" was not found. 
Confirm that the path in the <Import> declaration is correct, and that the file exists on disk. (MSB4019) (HelloWorld)

这个错误。我做了一些研究,我无法理解任何解决方案,因为我完全是 linux 上的 mono c# 编程的初学者

标签: c#linuxmsbuildmonomonodevelop

解决方案


我曾经遇到过“找不到 Microsoft.CSHARP.Targets”。解决方案是将其更改为“Microsoft.Csharp.targets”。所以也许你可以尝试同样的方法。


推荐阅读