我已经成功地为 android 创建了应用程序。 当我要为 Windows 8 添加平台时,它显示如下错误
$cordova platform add wp8
checking wp8 requirements...
Error: Error while checking requirements: The command `msbuild` failed. Make sure you have
the latest Windows Phone SDKs installed, AND have the latest .NET framework added to your
path (i.e C:\Windows\Microsoft.NET\Framework\v4.0.30319).
请帮助我...:(
提前致谢...
最佳答案
我关注了这个fix of the same bug with wp7 :
打开 %HOMEPATH%\.cordova\lib\wp\cordova\3.3.0\wp8\bin\check_reqs.js 并搜索 var msversion = output.match 在 function SystemRequiermentsMet()(第 83 行)中。
我把它改成
var msversion = output.match(/Microsoft\s\(R\)\s+Build\sEngine\s[a-z]+\s4\.0\.30319/i);
到
var msversion = output.match(/4\.0\.30319/i);
对于这个任务来说,这仍然不是一个好的正则表达式。但它有效。
我还需要运行 Visual Studio 2012 x86 Phone Tools而不是普通的 cmd.exe。
顺便说一句:这个错误已经reported并为下一个版本修复。
关于windows - Windows Phone 8 phonegap CLI 中的 msbuild 失败,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/20947663/