“没有为所选目标检测到有效的MSBuild".使用Microsoft Visual Studio 2015构建Cordova时 [英] "No valid MSBuild was detected for the selected target" when build cordova with Microsoft visual studio 2015

查看:382
本文介绍了“没有为所选目标检测到有效的MSBuild".使用Microsoft Visual Studio 2015构建Cordova时的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在带有Microsoft Visual Studio Community 2015(版本14更新3)的Windows平台上使用bulid cordova(构建解决方案)时,出现No valid MSBuild was detected for the selected target错误.

I get the No valid MSBuild was detected for the selected target error when bulid cordova (build solution) for Windows platform with Microsoft visual studio community 2015 (ver 14 update 3).

在项目文件夹中运行cordova requirements时,我也会得到 Some of requirements check failed

And I also get Some of requirements check failed when run cordova requirements in project folder

Requirements check results for windows:
Windows OS: installed Windows 10
MSBuild Tools: not installed
MSBuild tools v.14.0 not found. Please install Visual Studio 2015 Community from https://www.visualstudio.com/downloads/download-visual-studio-vs
Visual Studio: not installed
Required version of Visual Studio not found. Please install Visual Studio 2015 Community from https://www.visualstudio.com/downloads/download-visual-studio-vs
Windows SDK: not installed
Windows SDK not found. Please ensure that you have installed Windows 10.0 SDK along with Visual Studio or install Windows 10.0 SDK separately from https://dev.windows.com/en-us/downloads
Windows Phone SDK: not installed
Windows Phone SDK not found. Please ensure that you have installed Windows Phone 10.0 SDK along with Visual Studio or install Windows Phone 10.0 SDK separately from https://dev.windows.com/develop/download-phone-sdk

我正在 Windows 10 Enterprise 64位

```我尝试过的事情

1)基于 cordova Windows平台指南安装Visual Studio时我已经包含以下功能

1) Base on cordova windows platforms guide i've already include below features when install visual studio

Universal windows app development Tools -> Tools (1.4) and Windows 10 SDK
Universal windows app development Tools -> Windows 10 SDK

Window 8.1 and windows phone 8.0/8.1 tools -> Tools and windows SKDs

2)我的项目只是从Visual Studio创建的空白项目(我也尝试了cordova create命令).

2) My project is just a blank project that create from visual studio (and I tried with cordova create command also).

3)将MSbuild路径添加到系统变量:

3) Add MSbuild path to system variable:

C:\Program Files (x86)\MSBuild\14.0\Bin
C:\Program Files (x86)\MSBuild\12.0\Bin (tried it also)

4)目标Windows 8.1和10

4) target windows 8.1 and 10

5)使用android平台成功构建.

5) Build successful with android platform.

感谢您的帮助

推荐答案

请确保您使用的是命令提示符",而不是"Node JS命令提示符"之类的变体.

Make sure you are using 'Command Prompt' and not some variation like 'Node JS Command Prompt'

这篇关于“没有为所选目标检测到有效的MSBuild".使用Microsoft Visual Studio 2015构建Cordova时的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆