No valid MSBuild was detected for the selected target

Guillermo Martinez Espina's Avatar

Guillermo Martinez Espina

03 Jul, 2019 06:51 PM

While running my cordova project I get the following error,

1452No valid MSBuild was detected for the selected target: Error: C:\Program Files (x86)\MSBuild\14.0\bin\msbuild.exe: Command failed with exit code 1

I noticed that Appveyor is using Visual Sutdio v2015, even having Visual Studio 2017 in my .appveyor.yml file set like this,

  - Visual Studio 2017

I also have on settings/environment/Build worker image set to Visual Studio 2017.

I wonder if my problem has something to do with not having Visual Studio 2017 installed?

Here is my .appveyor.yml configuration,

max_jobs: 1

shallow_clone: true

  nodejs_version: "10"

  - x64

  - Debug

  - git config --global core.autocrlf true
  - sh: curl -sflL '' | bash -e -
  - ps: iex ((new-object net.webclient).DownloadString(''))

  - Visual Studio 2017

  - ps: Install-Product node $env:nodejs_version x64
    # install modules
  - node --version
  - npm install -g cordova@8.1.2
  - npm install -g shasum
  - npm install shelljs
  - npm install -f

  - ps: scripts/ci/build_mobile.ps1

  - path: \zenput\static\phonegap\platforms\windows\AppPackages\
    name: Windows App

  - ps: $blockRdp = $true; iex ((new-object net.webclient).DownloadString(''))

  - node_modules -> appveyor.yml,package.json
  1. Support Staff 1 Posted by Feodor Fitsner on 04 Jul, 2019 04:06 AM

    Feodor Fitsner's Avatar

    In fact, Visual Studio 2017 image has both VS 2015 and VS 2017 installed. Could it be an issue for that detection algorithm?

  2. 2 Posted by Guillermo Marti... on 08 Jul, 2019 04:45 PM

    Guillermo Martinez Espina's Avatar

    I don't think that our script build_mobile.ps1 has something to do with this, because the only thing we do in that script is to check whether our commit has changes on our mobile base and if that's the case we run npx cordova build windows and that's when it breaks.

  3. 3 Posted by Ilya Finkelshte... on 08 Jul, 2019 06:13 PM

    Ilya Finkelshteyn's Avatar

    Is there any way you can provide a repro in public repository?

  4. Ilya Finkelshteyn closed this discussion on 07 Sep, 2019 09:01 PM.

Comments are currently closed for this discussion. You can start a new one.

Keyboard shortcuts


? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac