Reputation: 503
I have successfully create app for android. and when i am going to add platform for windows 8 it shows error like below
$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).
Please Help me... :(
Thanks in Advance...
Upvotes: 3
Views: 1693
Reputation: 1
Depending on .NET version the string returned by msbuild -version
command in the above mentionned script (%APP_DATA%\.cordova\lib\wp\cordova\3.3.0\wp8\bin\check_reqs.js)
varies.
For recent .NET the following regexp worked for me:
/Microsoft\s\.NET\sFramework,\sVersion\s4\.0\.30319/
Upvotes: 0
Reputation: 23542
I followed this fix of the same bug with wp7:
Open %HOMEPATH%\.cordova\lib\wp\cordova\3.3.0\wp8\bin\check_reqs.js
and search for var msversion = output.match
in function SystemRequiermentsMet()
(Line 83).
I changed it from
var msversion = output.match(/Microsoft\s\(R\)\s+Build\sEngine\s[a-z]+\s4\.0\.30319/i);
to
var msversion = output.match(/4\.0\.30319/i);
That is still not a good regexp for the task. But it works.
Also I needed to run Visual Studio 2012 x86 Phone Tools instead of the normal cmd.exe.
BTW: This bug has been reported and fixed for next version.
Upvotes: 2