在mono / Ubuntu上构建SLN

前端之家收集整理的这篇文章主要介绍了在mono / Ubuntu上构建SLN前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
我正在尝试使用Mono / xbuild在Ubuntu上构建我的SLN

我开始收到与webapplication.targets相关的错误,并认为我已经通过添加simlink来解决这个问题,如Webapplication.targets missing when building a MVC4 project in MonoDevelop on OS X 10.7.4所示

但现在我得到了与之相关的错误
错误:初始化任务时出错错误:无法加载文件或程序集“Microsoft.Build.Tasks.v4.0”或其依赖项之一.

我需要采取哪些特殊步骤来完成这项工作吗?我需要特定版本的Mono吗?

[UPDATE]

看来这是Nuget步骤的一个问题:

azureuser@scratchpad:~/test-api/src/Model$xbuild Model.csproj
XBuild Engine Version 12.0
Mono,Version 3.2.8.0
Copyright (C) 2005-2013 VarIoUs Mono authors

Build started 8/4/2014 11:29:09 AM.
__________________________________________________
Project "/home/azureuser/test-api/src/Model/Model.csproj" (default target(s)):
        Target EnsureNuGetPackageBuildImports:
: error : Error initializing task Error: Could not load file or assembly 'Microsoft.Build.Tasks.v4.0' or one of its dependencies. The system cannot find the file specif
ied.
        Task "Error" execution -- Failed
        Done building target "EnsureNuGetPackageBuildImports" in project "/home/azureuser/test-api/src/Model/Model.csproj".-- Failed
        Target _RecordCleanFile:
: error : Error initializing task ReadLinesFromFile: Could not load file or assembly 'Microsoft.Build.Tasks.v4.0' or one of its dependencies. The system cannot find the
 file specified.
        Task "ReadLinesFromFile" execution -- Failed
        Done building target "_RecordCleanFile" in project "/home/azureuser/test-api/src/Model/Model.csproj".-- Failed
Done building project "/home/azureuser/test-api/src/Model/Model.csproj".-- Failed

Build Failed.
Errors:

/home/azureuser/test-api/src/Model/Model.csproj (default targets) ->
(EnsureNuGetPackageBuildImports target) ->

        : error : Error initializing task Error: Could not load file or assembly 'Microsoft.Build.Tasks.v4.0' or one of its dependencies. The system cannot find the fil
e specified.

/home/azureuser/test-api/src/Model/Model.csproj (default targets) ->
/usr/lib/mono/4.5/Microsoft.Common.targets (_RecordCleanFile target) ->

        : error : Error initializing task ReadLinesFromFile: Could not load file or assembly 'Microsoft.Build.Tasks.v4.0' or one of its dependencies. The system cannot
find the file specified.

         0 Warning(s)
         2 Error(s)

Time Elapsed 00:00:00.3989900
我在Debian Jessie遇到了同样的问题.
knocte的“提示”是正确的.
单声道的3.2.8版本是不够的.
我按照 mono-project site上的说明安装了最新版本
它的工作原理.

所以我做了:

#add the Mono Project GPG signing key as trusted
apt-key adv --keyserver pgp.mit.edu --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF

#add their pacages repository to apt sources
echo "deb http://download.mono-project.com/repo/debian wheezy main" > /etc/apt/sources.list.d/mono-xamarin.list

#refresh package list
apt-get update

#install newer mono & friends
apt-get install mono-devel

然后,我之前失败的xbuild工作了.

mono --version
    3.10.0 
xbuild /version 
   XBuild Engine Version 12.0

猜你在找的Ubuntu相关文章