我正在尝试在Ubuntu 14.4 LTS上使用xbuild编译项目。我有单声道4.2.3和xbuild 12
整个解决方案以前在OSX上使用mono进行构建,但是我的大学已经进行了一些更改(例如重命名项目),现在它也无法在OSX上构建。我不能为我的生活找出改变的原因。它继续在视觉工作室和詹金斯的msbuild建立良好。
解决方案中有5个项目,最初它们都返回了错误
<Projfile>:error : No target found in the project
经过一番谷歌搜索后,我将以下内容添加到我的所有项目文件中。
<Target Name="Build" DependsOnTargets="$(BuildDependsOn)" Outputs="$(TargetPath)" />
现在,只有2个类库项目返回此错误。
我已经通过运行诊断日志记录检查了所有我的msbuild变量被设置为正确的路径,并且我还发现了几个SO帖子,如果单声道安装正确与否。
我有点失落。
修改
这是根据请求使用/ v:diag运行的输出。
mjones@mlclustervs110:~/workspace/Mono-ServiceTemplate-Linux$ ./debugbuild.sh
Scanning for projects...
Found 5 projects with a packages.config file. (Microlise.MonoTemplate.Logger, Microlise.MonoTemplate.Microservice, Microlise.MonoTemplate.Tests.Helpers, Microlise.MonoTemplate.Tests.Intergration, Microlise.MonoTemplate.Tests.Unit)
Looking for installed packages in 'packages'.
Updating 'Microlise.MonoTemplate.Logger'...
Updating 'Microlise.MonoTemplate.Microservice'...
Updating 'Microlise.MonoTemplate.Tests.Helpers'...
Updating 'Microlise.MonoTemplate.Tests.Intergration'...
Updating 'Microlise.MonoTemplate.Tests.Unit'...
XBuild Engine Version 12.0
Mono, Version 4.2.3.0
Copyright (C) 2005-2013 Various Mono authors
Loading default tasks for ToolsVersion: 4.0 from /usr/lib/mono/4.5/Microsoft.Common.tasks
Build started 01/04/2016 08:30:35.
__________________________________________________
Loading default tasks for ToolsVersion: 12.0 from /usr/lib/mono/xbuild/12.0/bin/Microsoft.Common.tasks
Project "/home/mjones/workspace/Mono-ServiceTemplate-Linux/Microlise.MonoTemplate.sln" (default target(s)):
Initial Properties:
_ = /usr/bin/xbuild
AspNetConfiguration = $(Configuration)
Configuration = Debug
CurrentSolutionConfigurationContents = <SolutionConfiguration xmlns=""><ProjectConfiguration Project="{DAA924E0-7C89-4E49-B1C6-28B66ABAC229}">Debug|AnyCPU</ProjectConfiguration><ProjectConfiguration Project="{BBF92C72-30BF-46E2-8C09-35D1E4773C82}">Debug|x86</ProjectConfiguration><ProjectConfiguration Project="{2F2DD425-BAE2-46A4-BC3B-C722B0C6E326}">Debug|AnyCPU</ProjectConfiguration><ProjectConfiguration Project="{F9162212-6CE4-4AD5-AFD5-F4AF03D89412}">Debug|AnyCPU</ProjectConfiguration><ProjectConfiguration Project="{AA6310E1-91CF-4392-A4E7-F41493005A55}">Debug|AnyCPU</ProjectConfiguration></SolutionConfiguration>
EnableNuGetPackageRestore = true
ftp_proxy = http://foxy:8080
HOME = /home/mjones
http_proxy = http://foxy:8080
https_proxy = https://foxy:8080
LANG = en_GB.UTF-8
LANGUAGE = en_GB:en
LESSCLOSE = /usr/bin/lesspipe %s %s
LESSOPEN = | /usr/bin/lesspipe %s
LOGNAME = mjones
LS_COLORS = rs=0:di=01;34:ln=01;36:mh=00:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:su=37;41:sg=30;43:ca=30;41:tw=30;42:ow=34;42:st=37;44:ex=01;32:*.tar=01;31:*.tgz=01;31:*.arj=01;31:*.taz=01;31:*.lzh=01;31:*.lzma=01;31:*.tlz=01;31:*.txz=01;31:*.zip=01;31:*.z=01;31:*.Z=01;31:*.dz=01;31:*.gz=01;31:*.lz=01;31:*.xz=01;31:*.bz2=01;31:*.bz=01;31:*.tbz=01;31:*.tbz2=01;31:*.tz=01;31:*.deb=01;31:*.rpm=01;31:*.jar=01;31:*.war=01;31:*.ear=01;31:*.sar=01;31:*.rar=01;31:*.ace=01;31:*.zoo=01;31:*.cpio=01;31:*.7z=01;31:*.rz=01;31:*.jpg=01;35:*.jpeg=01;35:*.gif=01;35:*.bmp=01;35:*.pbm=01;35:*.pgm=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.tiff=01;35:*.png=01;35:*.svg=01;35:*.svgz=01;35:*.mng=01;35:*.pcx=01;35:*.mov=01;35:*.mpg=01;35:*.mpeg=01;35:*.m2v=01;35:*.mkv=01;35:*.webm=01;35:*.ogm=01;35:*.mp4=01;35:*.m4v=01;35:*.mp4v=01;35:*.vob=01;35:*.qt=01;35:*.nuv=01;35:*.wmv=01;35:*.asf=01;35:*.rm=01;35:*.rmvb=01;35:*.flc=01;35:*.avi=01;35:*.fli=01;35:*.flv=01;35:*.gl=01;35:*.dl=01;35:*.xcf=01;35:*.xwd=01;35:*.yuv=01;35:*.cgm=01;35:*.emf=01;35:*.axv=01;35:*.anx=01;35:*.ogv=01;35:*.ogx=01;35:*.aac=00;36:*.au=00;36:*.flac=00;36:*.mid=00;36:*.midi=00;36:*.mka=00;36:*.mp3=00;36:*.mpc=00;36:*.ogg=00;36:*.ra=00;36:*.wav=00;36:*.axa=00;36:*.oga=00;36:*.spx=00;36:*.xspf=00;36:
MAIL = /var/mail/mjones
MSBuildBinPath = /usr/lib/mono/xbuild/12.0/bin
MSBuildExtensionsPath = /usr/lib/mono/xbuild
MSBuildExtensionsPath32 = /usr/lib/mono/xbuild
MSBuildExtensionsPath64 = /usr/lib/mono/xbuild
MSBuildFrameworkToolsPath = /usr/lib/mono/4.5
MSBuildFrameworkToolsPath32 = /usr/lib/mono/4.5
MSBuildProjectDefaultTargets = Build
MSBuildProjectDirectory = /home/mjones/workspace/Mono-ServiceTemplate-Linux
MSBuildProjectExtension = .sln
MSBuildProjectFile = Microlise.MonoTemplate.sln
MSBuildProjectFullPath = /home/mjones/workspace/Mono-ServiceTemplate-Linux/Microlise.MonoTemplate.sln
MSBuildProjectName = Microlise.MonoTemplate
MSBuildThisFile = Microlise.MonoTemplate.sln
MSBuildThisFileDirectory = /home/mjones/workspace/Mono-ServiceTemplate-Linux/
MSBuildThisFileDirectoryNoRoot = home/mjones/workspace/Mono-ServiceTemplate-Linux/
MSBuildThisFileExtension = .sln
MSBuildThisFileFullPath = /home/mjones/workspace/Mono-ServiceTemplate-Linux/Microlise.MonoTemplate.sln
MSBuildThisFileName = Microlise.MonoTemplate
MSBuildToolsPath = /usr/lib/mono/xbuild/12.0/bin
MSBuildToolsPath32 = /usr/lib/mono/xbuild/12.0/bin
MSBuildToolsRoot = /usr/lib/mono/xbuild/12.0
MSBuildToolsVersion = 12.0
no_proxy = microlise19,localhost,*.ml.local,127.0.0.1,127.0.1.1*,local.home
OLDPWD = /home/mjones/workspace/Mono-ServiceTemplate-Linux/.nuget
OS = Unix
PATH = /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games
Platform = Mixed Platforms
PWD = /home/mjones/workspace/Mono-ServiceTemplate-Linux
SHELL = /bin/bash
SHLVL = 2
SolutionDir = /home/mjones/workspace/Mono-ServiceTemplate-Linux/
SolutionExt = .sln
SolutionFileName = Microlise.MonoTemplate.sln
SolutionName = Microlise.MonoTemplate
SolutionPath = /home/mjones/workspace/Mono-ServiceTemplate-Linux/Microlise.MonoTemplate.sln
SSH_CLIENT = 172.17.150.93 56285 22
SSH_CONNECTION = 172.17.150.93 56285 172.17.147.110 22
SSH_TTY = /dev/pts/1
TERM = cygwin
USER = mjones
XDG_RUNTIME_DIR = /run/user/1001
XDG_SESSION_ID = 19
Initial Items:
BuildLevel0
/home/mjones/workspace/Mono-ServiceTemplate-Linux/Microlise.MonoTemplate.Logger/Microlise.MonoTemplate.Logger.csproj
/home/mjones/workspace/Mono-ServiceTemplate-Linux/Microlise.MonoTemplate.Microservice/Microlise.MonoTemplate.Microservice.csproj
/home/mjones/workspace/Mono-ServiceTemplate-Linux/Microlise.MonoTemplate.Tests.Helpers/Microlise.MonoTemplate.Tests.Helpers.csproj
BuildLevel1
/home/mjones/workspace/Mono-ServiceTemplate-Linux/Microlise.MonoTemplate.Tests.Intergration/Microlise.MonoTemplate.Tests.Intergration.csproj
/home/mjones/workspace/Mono-ServiceTemplate-Linux/Microlise.MonoTemplate.Tests.Unit/Microlise.MonoTemplate.Tests.Unit.csproj
ProjectReference
/home/mjones/workspace/Mono-ServiceTemplate-Linux/Microlise.MonoTemplate.Logger/Microlise.MonoTemplate.Logger.csproj
/home/mjones/workspace/Mono-ServiceTemplate-Linux/Microlise.MonoTemplate.Microservice/Microlise.MonoTemplate.Microservice.csproj
/home/mjones/workspace/Mono-ServiceTemplate-Linux/Microlise.MonoTemplate.Tests.Intergration/Microlise.MonoTemplate.Tests.Intergration.csproj
/home/mjones/workspace/Mono-ServiceTemplate-Linux/Microlise.MonoTemplate.Tests.Unit/Microlise.MonoTemplate.Tests.Unit.csproj
/home/mjones/workspace/Mono-ServiceTemplate-Linux/Microlise.MonoTemplate.Tests.Helpers/Microlise.MonoTemplate.Tests.Helpers.csproj
Building target "ValidateSolutionConfiguration" in project "/home/mjones/workspace/Mono-ServiceTemplate-Linux/Microlise.MonoTemplate.sln" ("/home/mjones/workspace/Mono-ServiceTemplate-Linux/Microlise.MonoTemplate.sln").
Target ValidateSolutionConfiguration:
Task "Message"
Using task Message from Microsoft.Build.Tasks.Message, Microsoft.Build.Tasks.v12.0, Version=12.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
Building solution configuration "Debug|Mixed Platforms".
Done executing task "Message"
Done building target "ValidateSolutionConfiguration" in project "/home/mjones/workspace/Mono-ServiceTemplate-Linux/Microlise.MonoTemplate.sln".
Done building target "ValidateSolutionConfiguration" in project "/home/mjones/workspace/Mono-ServiceTemplate-Linux/Microlise.MonoTemplate.sln" ("/home/mjones/workspace/Mono-ServiceTemplate-Linux/Microlise.MonoTemplate.sln").
Building target "Build" in project "/home/mjones/workspace/Mono-ServiceTemplate-Linux/Microlise.MonoTemplate.sln" ("/home/mjones/workspace/Mono-ServiceTemplate-Linux/Microlise.MonoTemplate.sln").
Target Build:
Task "MSBuild"
Using task MSBuild from Microsoft.Build.Tasks.MSBuild, Microsoft.Build.Tasks.v12.0, Version=12.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
Global Properties:
BuildingSolutionFile = true
Configuration = Debug
CurrentSolutionConfigurationContents = <SolutionConfiguration xmlns=""><ProjectConfiguration Project="{DAA924E0-7C89-4E49-B1C6-28B66ABAC229}">Debug|AnyCPU</ProjectConfiguration><ProjectConfiguration Project="{BBF92C72-30BF-46E2-8C09-35D1E4773C82}">Debug|x86</ProjectConfiguration><ProjectConfiguration Project="{2F2DD425-BAE2-46A4-BC3B-C722B0C6E326}">Debug|AnyCPU</ProjectConfiguration><ProjectConfiguration Project="{F9162212-6CE4-4AD5-AFD5-F4AF03D89412}">Debug|AnyCPU</ProjectConfiguration><ProjectConfiguration Project="{AA6310E1-91CF-4392-A4E7-F41493005A55}">Debug|AnyCPU</ProjectConfiguration></SolutionConfiguration>
Platform = AnyCPU
SolutionDir = /home/mjones/workspace/Mono-ServiceTemplate-Linux/
SolutionExt = .sln
SolutionFileName = Microlise.MonoTemplate.sln
SolutionName = Microlise.MonoTemplate
SolutionPath = /home/mjones/workspace/Mono-ServiceTemplate-Linux/Microlise.MonoTemplate.sln
Project "/home/mjones/workspace/Mono-ServiceTemplate-Linux/Microlise.MonoTemplate.Logger/Microlise.MonoTemplate.Logger.csproj" (default target(s)):
Initial Properties:
_ = /usr/bin/xbuild
BuildingSolutionFile = true
Configuration = Debug
CurrentSolutionConfigurationContents = <SolutionConfiguration xmlns=""><ProjectConfiguration Project="{DAA924E0-7C89-4E49-B1C6-28B66ABAC229}">Debug|AnyCPU</ProjectConfiguration><ProjectConfiguration Project="{BBF92C72-30BF-46E2-8C09-35D1E4773C82}">Debug|x86</ProjectConfiguration><ProjectConfiguration Project="{2F2DD425-BAE2-46A4-BC3B-C722B0C6E326}">Debug|AnyCPU</ProjectConfiguration><ProjectConfiguration Project="{F9162212-6CE4-4AD5-AFD5-F4AF03D89412}">Debug|AnyCPU</ProjectConfiguration><ProjectConfiguration Project="{AA6310E1-91CF-4392-A4E7-F41493005A55}">Debug|AnyCPU</ProjectConfiguration></SolutionConfiguration>
EnableNuGetPackageRestore = true
ftp_proxy = http://foxy:8080
HOME = /home/mjones
http_proxy = http://foxy:8080
https_proxy = https://foxy:8080
LANG = en_GB.UTF-8
LANGUAGE = en_GB:en
LESSCLOSE = /usr/bin/lesspipe %s %s
LESSOPEN = | /usr/bin/lesspipe %s
LOGNAME = mjones
LS_COLORS = rs=0:di=01;34:ln=01;36:mh=00:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:su=37;41:sg=30;43:ca=30;41:tw=30;42:ow=34;42:st=37;44:ex=01;32:*.tar=01;31:*.tgz=01;31:*.arj=01;31:*.taz=01;31:*.lzh=01;31:*.lzma=01;31:*.tlz=01;31:*.txz=01;31:*.zip=01;31:*.z=01;31:*.Z=01;31:*.dz=01;31:*.gz=01;31:*.lz=01;31:*.xz=01;31:*.bz2=01;31:*.bz=01;31:*.tbz=01;31:*.tbz2=01;31:*.tz=01;31:*.deb=01;31:*.rpm=01;31:*.jar=01;31:*.war=01;31:*.ear=01;31:*.sar=01;31:*.rar=01;31:*.ace=01;31:*.zoo=01;31:*.cpio=01;31:*.7z=01;31:*.rz=01;31:*.jpg=01;35:*.jpeg=01;35:*.gif=01;35:*.bmp=01;35:*.pbm=01;35:*.pgm=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.tiff=01;35:*.png=01;35:*.svg=01;35:*.svgz=01;35:*.mng=01;35:*.pcx=01;35:*.mov=01;35:*.mpg=01;35:*.mpeg=01;35:*.m2v=01;35:*.mkv=01;35:*.webm=01;35:*.ogm=01;35:*.mp4=01;35:*.m4v=01;35:*.mp4v=01;35:*.vob=01;35:*.qt=01;35:*.nuv=01;35:*.wmv=01;35:*.asf=01;35:*.rm=01;35:*.rmvb=01;35:*.flc=01;35:*.avi=01;35:*.fli=01;35:*.flv=01;35:*.gl=01;35:*.dl=01;35:*.xcf=01;35:*.xwd=01;35:*.yuv=01;35:*.cgm=01;35:*.emf=01;35:*.axv=01;35:*.anx=01;35:*.ogv=01;35:*.ogx=01;35:*.aac=00;36:*.au=00;36:*.flac=00;36:*.mid=00;36:*.midi=00;36:*.mka=00;36:*.mp3=00;36:*.mpc=00;36:*.ogg=00;36:*.ra=00;36:*.wav=00;36:*.axa=00;36:*.oga=00;36:*.spx=00;36:*.xspf=00;36:
MAIL = /var/mail/mjones
MSBuildBinPath = /usr/lib/mono/4.5
MSBuildExtensionsPath = /usr/lib/mono/xbuild
MSBuildExtensionsPath32 = /usr/lib/mono/xbuild
MSBuildExtensionsPath64 = /usr/lib/mono/xbuild
MSBuildProjectDefaultTargets =
MSBuildProjectDirectory = /home/mjones/workspace/Mono-ServiceTemplate-Linux/Microlise.MonoTemplate.Logger
MSBuildProjectExtension = .csproj
MSBuildProjectFile = Microlise.MonoTemplate.Logger.csproj
MSBuildProjectFullPath = /home/mjones/workspace/Mono-ServiceTemplate-Linux/Microlise.MonoTemplate.Logger/Microlise.MonoTemplate.Logger.csproj
MSBuildProjectName = Microlise.MonoTemplate.Logger
MSBuildThisFile = Microlise.MonoTemplate.Logger.csproj
MSBuildThisFileDirectory = /home/mjones/workspace/Mono-ServiceTemplate-Linux/Microlise.MonoTemplate.Logger/
MSBuildThisFileDirectoryNoRoot = home/mjones/workspace/Mono-ServiceTemplate-Linux/Microlise.MonoTemplate.Logger/
MSBuildThisFileExtension = .csproj
MSBuildThisFileFullPath = /home/mjones/workspace/Mono-ServiceTemplate-Linux/Microlise.MonoTemplate.Logger/Microlise.MonoTemplate.Logger.csproj
MSBuildThisFileName = Microlise.MonoTemplate.Logger
MSBuildToolsPath = /usr/lib/mono/4.5
MSBuildToolsRoot = /usr/lib/mono
MSBuildToolsVersion = 4.0
no_proxy = microlise19,localhost,*.ml.local,127.0.0.1,127.0.1.1*,local.home
OLDPWD = /home/mjones/workspace/Mono-ServiceTemplate-Linux/.nuget
OS = Unix
PATH = /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games
Platform = AnyCPU
PWD = /home/mjones/workspace/Mono-ServiceTemplate-Linux
SHELL = /bin/bash
SHLVL = 2
SolutionDir = /home/mjones/workspace/Mono-ServiceTemplate-Linux/
SolutionExt = .sln
SolutionFileName = Microlise.MonoTemplate.sln
SolutionName = Microlise.MonoTemplate
SolutionPath = /home/mjones/workspace/Mono-ServiceTemplate-Linux/Microlise.MonoTemplate.sln
SSH_CLIENT = 172.17.150.93 56285 22
SSH_CONNECTION = 172.17.150.93 56285 172.17.147.110 22
SSH_TTY = /dev/pts/1
TERM = cygwin
USER = mjones
XDG_RUNTIME_DIR = /run/user/1001
XDG_SESSION_ID = 19
Initial Items:
/home/mjones/workspace/Mono-ServiceTemplate-Linux/Microlise.MonoTemplate.Logger/Microlise.MonoTemplate.Logger.csproj: error : No target found in the project
Done building project "/home/mjones/workspace/Mono-ServiceTemplate-Linux/Microlise.MonoTemplate.Logger/Microlise.MonoTemplate.Logger.csproj".-- FAILED
Project "/home/mjones/workspace/Mono-ServiceTemplate-Linux/Microlise.MonoTemplate.Tests.Helpers/Microlise.MonoTemplate.Tests.Helpers.csproj" (default target(s)):
Initial Properties:
_ = /usr/bin/xbuild
BuildingSolutionFile = true
Configuration = Debug
CurrentSolutionConfigurationContents = <SolutionConfiguration xmlns=""><ProjectConfiguration Project="{DAA924E0-7C89-4E49-B1C6-28B66ABAC229}">Debug|AnyCPU</ProjectConfiguration><ProjectConfiguration Project="{BBF92C72-30BF-46E2-8C09-35D1E4773C82}">Debug|x86</ProjectConfiguration><ProjectConfiguration Project="{2F2DD425-BAE2-46A4-BC3B-C722B0C6E326}">Debug|AnyCPU</ProjectConfiguration><ProjectConfiguration Project="{F9162212-6CE4-4AD5-AFD5-F4AF03D89412}">Debug|AnyCPU</ProjectConfiguration><ProjectConfiguration Project="{AA6310E1-91CF-4392-A4E7-F41493005A55}">Debug|AnyCPU</ProjectConfiguration></SolutionConfiguration>
EnableNuGetPackageRestore = true
ftp_proxy = http://foxy:8080
HOME = /home/mjones
http_proxy = http://foxy:8080
https_proxy = https://foxy:8080
LANG = en_GB.UTF-8
LANGUAGE = en_GB:en
LESSCLOSE = /usr/bin/lesspipe %s %s
LESSOPEN = | /usr/bin/lesspipe %s
LOGNAME = mjones
LS_COLORS = rs=0:di=01;34:ln=01;36:mh=00:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:su=37;41:sg=30;43:ca=30;41:tw=30;42:ow=34;42:st=37;44:ex=01;32:*.tar=01;31:*.tgz=01;31:*.arj=01;31:*.taz=01;31:*.lzh=01;31:*.lzma=01;31:*.tlz=01;31:*.txz=01;31:*.zip=01;31:*.z=01;31:*.Z=01;31:*.dz=01;31:*.gz=01;31:*.lz=01;31:*.xz=01;31:*.bz2=01;31:*.bz=01;31:*.tbz=01;31:*.tbz2=01;31:*.tz=01;31:*.deb=01;31:*.rpm=01;31:*.jar=01;31:*.war=01;31:*.ear=01;31:*.sar=01;31:*.rar=01;31:*.ace=01;31:*.zoo=01;31:*.cpio=01;31:*.7z=01;31:*.rz=01;31:*.jpg=01;35:*.jpeg=01;35:*.gif=01;35:*.bmp=01;35:*.pbm=01;35:*.pgm=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.tiff=01;35:*.png=01;35:*.svg=01;35:*.svgz=01;35:*.mng=01;35:*.pcx=01;35:*.mov=01;35:*.mpg=01;35:*.mpeg=01;35:*.m2v=01;35:*.mkv=01;35:*.webm=01;35:*.ogm=01;35:*.mp4=01;35:*.m4v=01;35:*.mp4v=01;35:*.vob=01;35:*.qt=01;35:*.nuv=01;35:*.wmv=01;35:*.asf=01;35:*.rm=01;35:*.rmvb=01;35:*.flc=01;35:*.avi=01;35:*.fli=01;35:*.flv=01;35:*.gl=01;35:*.dl=01;35:*.xcf=01;35:*.xwd=01;35:*.yuv=01;35:*.cgm=01;35:*.emf=01;35:*.axv=01;35:*.anx=01;35:*.ogv=01;35:*.ogx=01;35:*.aac=00;36:*.au=00;36:*.flac=00;36:*.mid=00;36:*.midi=00;36:*.mka=00;36:*.mp3=00;36:*.mpc=00;36:*.ogg=00;36:*.ra=00;36:*.wav=00;36:*.axa=00;36:*.oga=00;36:*.spx=00;36:*.xspf=00;36:
MAIL = /var/mail/mjones
MSBuildBinPath = /usr/lib/mono/4.5
MSBuildExtensionsPath = /usr/lib/mono/xbuild
MSBuildExtensionsPath32 = /usr/lib/mono/xbuild
MSBuildExtensionsPath64 = /usr/lib/mono/xbuild
MSBuildProjectDefaultTargets =
MSBuildProjectDirectory = /home/mjones/workspace/Mono-ServiceTemplate-Linux/Microlise.MonoTemplate.Tests.Helpers
MSBuildProjectExtension = .csproj
MSBuildProjectFile = Microlise.MonoTemplate.Tests.Helpers.csproj
MSBuildProjectFullPath = /home/mjones/workspace/Mono-ServiceTemplate-Linux/Microlise.MonoTemplate.Tests.Helpers/Microlise.MonoTemplate.Tests.Helpers.csproj
MSBuildProjectName = Microlise.MonoTemplate.Tests.Helpers
MSBuildThisFile = Microlise.MonoTemplate.Tests.Helpers.csproj
MSBuildThisFileDirectory = /home/mjones/workspace/Mono-ServiceTemplate-Linux/Microlise.MonoTemplate.Tests.Helpers/
MSBuildThisFileDirectoryNoRoot = home/mjones/workspace/Mono-ServiceTemplate-Linux/Microlise.MonoTemplate.Tests.Helpers/
MSBuildThisFileExtension = .csproj
MSBuildThisFileFullPath = /home/mjones/workspace/Mono-ServiceTemplate-Linux/Microlise.MonoTemplate.Tests.Helpers/Microlise.MonoTemplate.Tests.Helpers.csproj
MSBuildThisFileName = Microlise.MonoTemplate.Tests.Helpers
MSBuildToolsPath = /usr/lib/mono/4.5
MSBuildToolsRoot = /usr/lib/mono
MSBuildToolsVersion = 4.0
no_proxy = microlise19,localhost,*.ml.local,127.0.0.1,127.0.1.1*,local.home
OLDPWD = /home/mjones/workspace/Mono-ServiceTemplate-Linux/.nuget
OS = Unix
PATH = /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games
Platform = AnyCPU
PWD = /home/mjones/workspace/Mono-ServiceTemplate-Linux
SHELL = /bin/bash
SHLVL = 2
SolutionDir = /home/mjones/workspace/Mono-ServiceTemplate-Linux/
SolutionExt = .sln
SolutionFileName = Microlise.MonoTemplate.sln
SolutionName = Microlise.MonoTemplate
SolutionPath = /home/mjones/workspace/Mono-ServiceTemplate-Linux/Microlise.MonoTemplate.sln
SSH_CLIENT = 172.17.150.93 56285 22
SSH_CONNECTION = 172.17.150.93 56285 172.17.147.110 22
SSH_TTY = /dev/pts/1
TERM = cygwin
USER = mjones
XDG_RUNTIME_DIR = /run/user/1001
XDG_SESSION_ID = 19
Initial Items:
/home/mjones/workspace/Mono-ServiceTemplate-Linux/Microlise.MonoTemplate.Tests.Helpers/Microlise.MonoTemplate.Tests.Helpers.csproj: error : No target found in the project
Done building project "/home/mjones/workspace/Mono-ServiceTemplate-Linux/Microlise.MonoTemplate.Tests.Helpers/Microlise.MonoTemplate.Tests.Helpers.csproj".-- FAILED
Task "MSBuild" execution -- FAILED
Done building target "Build" in project "/home/mjones/workspace/Mono-ServiceTemplate-Linux/Microlise.MonoTemplate.sln".-- FAILED
Done building target "Build" in project "/home/mjones/workspace/Mono-ServiceTemplate-Linux/Microlise.MonoTemplate.sln" ("/home/mjones/workspace/Mono-ServiceTemplate-Linux/Microlise.MonoTemplate.sln").
Done building project "/home/mjones/workspace/Mono-ServiceTemplate-Linux/Microlise.MonoTemplate.sln".-- FAILED
Target performance summary:
12.440 ms ValidateSolutionConfiguration 1 calls
15.775 ms Build 1 calls
Tasks performance summary:
8.211 ms Message 1 calls
14.441 ms MSBuild 1 calls
Build FAILED.
Errors:
/home/mjones/workspace/Mono-ServiceTemplate-Linux/Microlise.MonoTemplate.sln (default targets) ->
(Build target) ->
/home/mjones/workspace/Mono-ServiceTemplate-Linux/Microlise.MonoTemplate.Logger/Microlise.MonoTemplate.Logger.csproj (default targets) ->
/home/mjones/workspace/Mono-ServiceTemplate-Linux/Microlise.MonoTemplate.Logger/Microlise.MonoTemplate.Logger.csproj: error : No target found in the project
/home/mjones/workspace/Mono-ServiceTemplate-Linux/Microlise.MonoTemplate.sln (default targets) ->
(Build target) ->
/home/mjones/workspace/Mono-ServiceTemplate-Linux/Microlise.MonoTemplate.Tests.Helpers/Microlise.MonoTemplate.Tests.Helpers.csproj (default targets) ->
/home/mjones/workspace/Mono-ServiceTemplate-Linux/Microlise.MonoTemplate.Tests.Helpers/Microlise.MonoTemplate.Tests.Helpers.csproj: error : No target found in the project
0 Warning(s)
2 Error(s)
Time Elapsed 00:00:00.1838320
mjones@mlclustervs110:~/workspace/Mono-ServiceTemplate-Linux$
非常奇怪的是,我的csproj文件开始像在源代码控制中一样。这样的事情(编辑字符限制)
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{DAA924E0-7C89-4E49-B1C6-28B66ABAC229}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>Microlise.MonoTemplate.Logger</RootNamespace>
<AssemblyName>Microlise.MonoTemplate.Logger</AssemblyName>
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\</SolutionDir>
<RestorePackages>true</RestorePackages>
<TargetFrameworkProfile />
</PropertyGroup>
......
但如果我在构建失败后查看它,它已更改为:
<?xml version="1.0" encoding="utf-8">
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" />
这就是文件中的所有内容。没有目标,没有。所以在我看来,似乎xbuild / mono正在修改csproj文件,因为它出于某种原因执行构建?
编辑2
这是Logger项目的导入\
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<Import Project="$(SolutionDir)\.nuget\NuGet.targets" Condition="Exists('$(SolutionDir)\.nuget\NuGet.targets')" />
答案 0 :(得分:1)
nuget update -safe Microlise.MonoTemplate.sln -repositoryPath ./packages
更新nuget后,我现在可以简单地运行
nuget restore Microlise.MonoTemplate.sln
其他问题都消失了。