我试图在/SteamBot-master/SteamBot.sln中编译.sln文件。 经过研究,我发现我只能在Xamarin Studio的mdtool目录中使用mdtool。所以我进入终端的是:
"/Applications/Xamarin\ Studio.app/Contents/MacOS/mdtool" -v build SteamBot-master/SteamBot.sln
这是我收到的错误消息:
-bash: /Applications/Xamarin\ Studio.app/Contents/MacOS/mdtool: No such file or directory
mdtool.exec应用程序在MacOS文件中,我已经检查过了。当我尝试在Xamarin Studio中运行应用程序时,出现以下错误:
/Users/Johannes/SteamBot-master/.nuget/NuGet.targets: Error: Command 'bash "/Users/Johannes/SteamBot-master/.nuget/../.ci/exec-with-retry.sh" mono --runtime=v4.0.30319 /Users/Johannes/SteamBot-master/.nuget/NuGet.exe install "packages.config" -source "" -RequireConsent -solutionDir "/Users/Johannes/SteamBot-master/"' exited with code: 127. (SteamTrade)
如果有人能帮助我解决这个问题,我真的很感激,所以我可以使用该应用程序。非常感谢你,我为我缺乏编程知识而道歉。
编辑:新错误消息
jo-macbook:~ Johannes$ /Applications/Xamarin\ Studio.app/Contents/MacOS/mdtool -v build SteamBot-master/SteamBot.sln
Xamarin Studio Build Tool
Projektmappe /Users/Johannes/SteamBot-master/SteamBot.sln wird geladen
Projektmappe /Users/Johannes/SteamBot-master/SteamBot.sln wird geladen
Loading projects ..
Erzeuge Projektmappe: SteamBot (Debug)
SteamTrade (Debug) wird erzeugt
Build started 30.08.2015 14:59:16.
__________________________________________________
Project "/Users/Johannes/SteamBot-master/SteamTrade/SteamTrade.csproj"
(Build target(s)):
Target RestorePackages:
Executing: bash
"/Users/Johannes/SteamBot-master/.nuget/../.ci/exec-with-retry.sh" mono
--runtime=v4.0.30319 /Users/Johannes/SteamBot-master/.nuget/NuGet.exe
install "packages.config" -source "" -RequireConsent -solutionDir
"/Users/Johannes/SteamBot-master/"
bash: /Users/Johannes/SteamBot-master/.nuget/../.ci/exec-with-retry.sh:
No such file or directory
/Users/Johannes/SteamBot-master/.nuget/NuGet.targets: error : Command
'bash "/Users/Johannes/SteamBot-master/.nuget/../.ci/exec-with-retry.sh"
mono --runtime=v4.0.30319
/Users/Johannes/SteamBot-master/.nuget/NuGet.exe install
"packages.config" -source "" -RequireConsent -solutionDir
"/Users/Johannes/SteamBot-master/"' exited with code: 127.
Task "Exec" execution -- FAILED
Done building target "RestorePackages" in project
"/Users/Johannes/SteamBot-master/SteamTrade/SteamTrade.csproj".-- FAILED
Done building project
"/Users/Johannes/SteamBot-master/SteamTrade/SteamTrade.csproj".-- FAILED
Build FAILED.
Errors:
/Users/Johannes/SteamBot-master/SteamTrade/SteamTrade.csproj (Build) ->
/Users/Johannes/SteamBot-master/.nuget/NuGet.targets (RestorePackages
target) ->
/Users/Johannes/SteamBot-master/.nuget/NuGet.targets: error : Command
'bash "/Users/Johannes/SteamBot-master/.nuget/../.ci/exec-with-retry.sh"
mono --runtime=v4.0.30319
/Users/Johannes/SteamBot-master/.nuget/NuGet.exe install
"packages.config" -source "" -RequireConsent -solutionDir
"/Users/Johannes/SteamBot-master/"' exited with code: 127.
0 Warning(s)
1 Error(s)
Time Elapsed 00:00:00.1292110
/Users/Johannes/SteamBot-master/.nuget/NuGet.targets : error: Command 'bash "/Users/Johannes/SteamBot-master/.nuget/../.ci/exec-with-retry.sh" mono --runtime=v4.0.30319 /Users/Johannes/SteamBot-master/.nuget/NuGet.exe install "packages.config" -source "" -RequireConsent -solutionDir "/Users/Johannes/SteamBot-master/"' exited with code: 127.
答案 0 :(得分:1)
我假设您使用的是来自GitHub的SteamBot源代码:
https://github.com/Jessecar96/SteamBot
.ci/exec-with-retry.sh
文件丢失,因为这是持续集成构建的一部分,而且不在GitHub上。
可能最简单的解决方法是编辑.nuget / NuGet.targets文件并更改以下行:
<RestoreCommand Condition=" '$(OS)' != 'Windows_NT' ">bash "$(NuGetToolsPath)\..\.ci\exec-with-retry.sh" $(NuGetCommand) install "$(PackagesConfig)" -source "$(PackageSources)" $(RequireConsentSwitch) -solutionDir "$(SolutionDirParsed)"</RestoreCommand>
要:
<RestoreCommand Condition=" '$(OS)' != 'Windows_NT' ">$(NuGetCommand) install "$(PackagesConfig)" -source "$(PackageSources)" $(RequireConsentSwitch) -solutionDir "$(SolutionDirParsed)"</RestoreCommand>
这只是删除了对文件的引用和bash。
答案 1 :(得分:0)
问题在于你有效地避开了空间。用双引号括起一个带空格的命令,或者在每个空格的前面放一个反斜杠,但不能同时放两个!
使用以下任何一种:
/Applications/"Xamarin Studio.app"/Contents/MacOS/mdtool ...
或
/Applications/Xamarin\ Studio.app/Contents/MacOS/mdtool ...