Uploaded image for project: 'Apache Cordova'
  1. Apache Cordova
  2. CB-10101

Build for Windows with appx=UAP fails with Microsoft.NuGet.targets error

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Duplicate
    • Affects Version/s: Master
    • Fix Version/s: None
    • Component/s: cordova-windows
    • Labels:
      None
    • Environment:

      windows@4.2.0 platform, Windows 10 x64, Node 4.2.2 x64, VS2015 + latest updates installed

      Description

      Project working with windows@4.1.0 now updated to 4.2.0 gives the following error during building:

      ...> cordova build windows – --appx=uap
      Running command: cmd "/s /c "...\platforms\windows\cordova\build.bat --buildConfig=...\build.json --appx=uap""
      Reading build config file: ...\build.json
      MSBuildToolsPath: C:\Program Files (x86)\MSBuild\14.0\bin
      Building project: ...\platforms\windows\CordovaApp.Windows10.jsproj
      Configuration : debug
      Platform : anycpu
      C:\Program Files (x86)\MSBuild\Microsoft\NuGet\Microsoft.NuGet.targets(211,5): error : Your project.json doesn't list 'win10' as a targeted runtime. You should
      add '"win10": { }' inside your "runtimes" section in your project.json, and then re-run NuGet restore. [...\platforms\windows\CordovaApp.Window
      s10.jsproj]
      ERROR: Error code 1 for command: C:\Program Files (x86)\MSBuild\14.0\bin\msbuild with args: ...\platforms\windows\CordovaApp.Windows10.jsproj,/clp:NoSummary;NoItemAndPropertyList;Verbosity=minimal,/nologo,/p:Configuration=debug,/p:Platform=anycpu
      ERROR building one of the platforms: Error: cmd: Command failed with exit code 2
      You may not have the required environment or OS to build this project
      Error: cmd: Command failed with exit code 2

      I tried to "cordova platform rm windows" and then to add it again. No difference. If I create a new test project, add the platform and build as above it works just fine.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                minduch Christopher Mindus
              • Votes:
                1 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: