Cordova构建Windows 10 - Visual Studio 2017

时间:2017-12-20 17:54:12

标签: visual-studio-2017

所以我正在尝试使用cordova通过Visual Studio 2017设置调试和Windows-x64来构建一个Windows 10应用程序。

错误:

Error       Error: C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\MSBuild\15.0\Bin\msbuild.exe: Command failed with exit code 1   SprocketMobilev2        1   

从输出:

C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\MSBuild\Microsoft\VisualStudio\v15.0\AppxPackage\Microsoft.AppXPackage.Targets(5043,5): warning APPX1901: The DefaultLanguage property is either missing from the project file or does not have a value. The fallback language is set to the Visual Studio language: en-US. [C:\_Development\SprocketII\SprocketMobilev2\43\SprocketMobilev2\plugins\cordova-plugin-ms-adal\src\windows\lib\adal3\ADAL3WinMDProxy.csproj]
C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\MSBuild\Microsoft\VisualStudio\v15.0\AppxPackage\Microsoft.AppXPackage.Targets(993,5): error APPX1639: File 'MakeAppx.exe' not found. See http://go.microsoft.com/fwlink/?LinkID=798187 for more information. [C:\_Development\SprocketII\SprocketMobilev2\43\SprocketMobilev2\platforms\windows\CordovaApp.Windows10.jsproj]
Command finished with error code 1: C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\MSBuild\15.0\Bin\msbuild.exe C:\_Development\SprocketII\SprocketMobilev2\43\SprocketMobilev2\platforms\windows\CordovaApp.Windows10.jsproj,/clp:NoSummary;NoItemAndPropertyList;Verbosity=minimal,/nologo,/p:Configuration=debug,/p:Platform=x64,/p:AppxBundle=Never
1>MSBUILD : cordova-build error : Error: C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\MSBuild\15.0\Bin\msbuild.exe: Command failed with exit code 1

当我尝试从cmd行构建(以管理员身份运行)时,我得到了这个:

>cordova build windows -- --debug --archs="x64"
Building project: C:\_Development\SprocketII\SprocketMobilev2\43\SprocketMobilev2\platforms\windows\CordovaApp.Windows10.jsproj
    Configuration : debug
    Platform      : x64
Patching 10 in prebuild event...
Injected base.js reference to the /www/index.html
Removing /( *)(<script\s+(?:type="text\/javascript"\s+)?src="\/\/Microsoft.WinJS.2.0\/js\/base.js">\s*<\/script>)(\s*)/ from /www/index.html
Removing /( *)(<script\s+(?:type="text\/javascript"\s+)?src="\/\/Microsoft.Phone.WinJS.2.1\/js\/base.js">\s*<\/script
>)(\s*)/ from /www/index.html ADAL3WinMDProxy -> C:\_Development\SprocketII\SprocketMobilev2\43\SprocketMobilev2\plugins\cordova-plugin-ms-adal\src
\windows\lib\adal3\bin\x64\Debug\ADAL3WinMDProxy.winmd
C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v14.0\AppxPackage\Microsoft.AppXPackage.Targets(4525,5): warning APPX1901: The DefaultLanguage property is either missing from the project file or does not have a value. The fallback language is set to the Visual Studio language: en-US. [C:\_Development\SprocketII\SprocketMobilev2\43\SprocketMobilev2\plugins\cordova-plugin-ms-adal\src\windows\lib\adal3\ADAL3WinMDProxy.csproj]
C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v14.0\AppxPackage\Microsoft.AppXPackage.Targets(931,5): error APP
X1639: File 'MakeAppx.exe' not found. See http://go.microsoft.com/fwlink/?LinkID=798187 for more information. [C:\_Development\SprocketII\SprocketMobilev2\43\SprocketMobilev2\platforms\windows\CordovaApp.Windows10.jsproj]
Error: C:\Program Files (x86)\MSBuild\14.0\bin\msbuild.exe: Command failed with exit code 1

1 个答案:

答案 0 :(得分:0)

删除platform / windows文件夹并重建项目。