我试图在/SteamBot.sln/SteamBot.sln中编译一个.sln文件。经过研究,我发现我只能在Xamarin中的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 directorymdtool.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.发布于 2015-09-03 21:11:25
我假设您使用的是来自SteamBot的GitHub源代码:
https://github.com/Jessecar96/SteamBot
.ci/exec-with-retry.sh文件缺失了,因为这是持续集成构建的一部分,而不是在GitHub上。
最简单的解决方法可能是编辑..nuget/NuGet.Target文件并更改以下行:
<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的引用。
发布于 2015-08-30 12:29:03
问题是你已经有效地逃离了这个空间。要么在双引号内加上空格的命令,要么在每个空格前面加一个反斜杠,但不是两者都放!
使用这两种方法之一:
/Applications/"Xamarin Studio.app"/Contents/MacOS/mdtool ...或
/Applications/Xamarin\ Studio.app/Contents/MacOS/mdtool ...https://stackoverflow.com/questions/32296415
复制相似问题