【发布时间】:2019-04-03 06:35:13
【问题描述】:
当我运行ionic cordova build windows 时,它会抛出类似错误-
> cordova build windows
ENV var MSBUILDDIR is set C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise
Building project: C:\Users\shail\Desktop\ionic-demo\ionic-4-windows\platforms\windows\CordovaApp.Windows10.jsproj
Configuration : debug
Platform : anycpu
Buildflags : /p:AppxBundle=Never
MSBuildTools : C:\Program Files (x86)\MSBuild\14.0\bin
buildProject spawn: C:\Program Files (x86)\MSBuild\14.0\bin\msbuild [ 'C:\\Users\\shail\\Desktop\\ionic-demo\\ionic-4-windows\\platforms\\windows\\CordovaApp.Windows10.jsproj',
'/clp:NoSummary;NoItemAndPropertyList;Verbosity=minimal',
'/nologo', '/p:Configuration=debug', '/p:Platform=anycpu', '/p:AppxBundle=Never'] { stdio: 'inherit' } C:\Users\shail\Desktop\ionic-demo\ionic-4-windows\platforms\windows\CordovaApp.Windows10.jsproj(61,5): error MSB4019: The imported project "C:\Program Files(x86)\MSBuild\Microsoft\VisualStudio\v14.0\Microsoft.VisualStudio..Default.props" was not found. Confirm that the path in the <Import> declaration is correct, and that the file exists on disk.
No valid MSBuild was detected for the selected target: Error: C:\Program Files (x86)\MSBuild\14.0\bin\msbuild: Command failed with exit code 1
有没有人可以帮助解决这个问题。
ionic -v 是4.12.0
cordove -v 是9.0.0
安装平台
科尔多瓦平台列表
Installed platforms:
android 8.0.0
windows 7.0.0
使用 Visual Studio 2017 企业版
【问题讨论】:
-
你好,你把版本改成15.0后,如果还是不行,报错信息还是错误MSB4019: The importing project "xxx" was not found?最新的错误信息是什么?
-
和构建窗口一样是调用msbuild工具来构建项目。您是否尝试过在 VS 中构建项目或在本地 vs2017 的开发人员命令提示符中使用 msbuild 命令,结果如何?我需要在本地构建 vs 或 msbuild 时抛出一些错误消息,以进一步找出问题的原因:) 任何更新请随时在此处分享。 !。
-
也许您可以从this link 中的 Farhad_87 解决方案中获得一些帮助。如果有帮助,请给我反馈。
标签: visual-studio cordova msbuild visual-studio-2017 ionic4