我有一个使用 Nancy Asp.Net Web 应用程序模板使用 Visual Studio 2013 创建的非常简单的项目。
在我的开发机器中,它是由 Visual Studio 2013 成功构建的。
但是当我尝试使用 xbuild 在 Linux Mono 环境中构建相同的源时,它失败了。
这是输出:
root@jannes:/home/hitly/hitly/src/Hitly.Service# xbuild
XBuild Engine Version 12.0
Mono, Version 3.2.8.0
Copyright (C) 2005-2013 Various Mono authors
Build started 3/31/2014 2:11:49 PM.
__________________________________________________
Project "/home/hitly/hitly/src/Hitly.Service/Hitly.Service.csproj" (default target(s)):
Target RestorePackages:
Executing: mono --runtime=v4.0.30319 ../.nuget/NuGet.exe install "" -source "" -RequireConsent -solutionDir "../"
The specified path is not of a legal form (empty). /home/hitly/hitly/src/.nuget/NuGet.targets: error : Command 'mono --runtime=v4.0.30319 ../.nuget/NuGet.exe install "" -source "" -RequireConsent -solutionDir "../"' exited with code: 1.
Task "Exec" execution -- FAILED
Done building target "RestorePackages" in project "/home/hitly/hitly/src/Hitly.Service/Hitly.Service.csproj".-- FAILED
Done building project
"/home/hitly/hitly/src/Hitly.Service/Hitly.Service.csproj".-- FAILED
Build FAILED. Errors:
/home/hitly/hitly/src/Hitly.Service/Hitly.Service.csproj (default targets) -> /home/hitly/hitly/src/.nuget/NuGet.targets
(RestorePackages target) ->
/home/hitly/hitly/src/.nuget/NuGet.targets: error : Command 'mono --runtime=v4.0.30319 ../.nuget/NuGet.exe install "" -source "" -RequireConsent -solutionDir "../"' exited with code: 1.
0 Warning(s)
1 Error(s)
Time Elapsed 00:00:00.7254640
我无法理解错误的原因。
如何在 Linux 上构建这些源代码?