C# 使用Mono4.3.3在Debian/Jessie上构建MonoDevelop

C# 使用Mono4.3.3在Debian/Jessie上构建MonoDevelop,c#,linux,mono,debian,monodevelop,C#,Linux,Mono,Debian,Monodevelop,我正在尝试在我的Debian/Jessie box上构建MonoDevelop(主分支)。 到目前为止,我设法编译了它,但它显示了5个错误和1个警告 Build FAILED. Warnings: /home/max/monodevelop/main/Main.sln (default targets) -> (Build target) -> /home/max/monodevelop/main/external/RefactoringEssentials/Refactorin

我正在尝试在我的Debian/Jessie box上构建MonoDevelop(主分支)。 到目前为止,我设法编译了它,但它显示了5个错误和1个警告

Build FAILED.

Warnings:

/home/max/monodevelop/main/Main.sln (default targets) ->
(Build target) ->
/home/max/monodevelop/main/external/RefactoringEssentials/RefactoringEssentials/RefactoringEssentials.csproj (default targets) ->
/usr/lib/mono/4.5/Microsoft.Common.targets (GetReferenceAssemblyPaths target) ->

 /usr/lib/mono/4.5/Microsoft.Common.targets:  warning : Unable to find framework corresponding to the target framework moniker '.NETPortable,Version=v4.5,Profile=Profile7'. Framework assembly references will be resolved from the GAC, which might not be the intended behavior.

Errors:

/home/max/monodevelop/main/Main.sln (default targets) ->
(Build target) ->
/home/max/monodevelop/main/src/addins/NUnit/NUnitRunner/NUnitRunner.csproj (default targets) ->
/usr/lib/mono/4.5/Microsoft.CSharp.targets (CoreCompile target) ->

NUnitTestRunner.cs(105,44): error CS0103: The name `LoggingThreshold' does not exist in the current context
NUnitTestRunner.cs(105,14): error CS1501: No overload for method `Run' takes `4' arguments
NUnitTestRunner.cs(124,25): error CS0246: The type or namespace name `ParameterizedMethodSuite' could not be found. Are you missing an assembly reference?
NUnitTestRunner.cs(124,25): error CS0150: A constant value is expected

/home/max/monodevelop/main/Main.sln (default targets) ->
(Build target) ->
/home/max/monodevelop/main/external/RefactoringEssentials/RefactoringEssentials/RefactoringEssentials.csproj (default targets) ->
/usr/lib/mono/4.5/Microsoft.Common.targets (GetReferenceAssemblyPaths target) ->

/usr/lib/mono/4.5/Microsoft.Common.targets: error : PCL Reference Assemblies not installed.

 1 Warning(s)
 5 Error(s)

Time Elapsed 00:00:07.6677160
Makefile:1086: recipe for target 'sln_build' failed
make[2]: *** [sln_build] Error 1
make[2]: Leaving directory '/home/max/monodevelop/main'
Makefile:645: recipe for target 'all-recursive' failed
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory '/home/max/monodevelop/main'
Makefile:23: recipe for target 'all-recursive' failed
make: *** [all-recursive] Error 1

我建议它与nunit有关,nunit装运的是未安装的mono和PCL参考组件。我知道MS作为安装程序发布了PCL引用程序集,但我无法在我的linux机器上安装它们。因为它是一个.NET需要的msi安装程序

解决方案是下载

使用git。调整debian/目录下的控制文件,不取决于

mono-xbuild

使用

debild-i-us-uc-b

然后使用

dpkg-i

安装所做的是将PCL引用程序集复制到

/usr/lib/mono/xbuild frameworks/.NETPortable


在此编译之后,MonoDevelop不会显示关于缺少PCL引用程序集的错误。希望这能帮助任何试图构建最新MonoDevelop的人。

您需要的是Mono开发工具包(MDK),而不是运行时,它将安装PCL目标。您需要的是
referenceassemblies PCL
软件包,请参阅以获取详细信息。我读了用法。我从git构建mono,没有为debian/jessie安装mono包,因为它已经过时了。这是一个选项吗?我使用了上面的链接,它解决了我的问题。我调整了控制文件,排除了mono xbuild构建debian包的依赖项,并使用dpkg-I安装了它。@maxpa1n87将解决方案作为答案发布,然后接受它。