Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-19673] windowslib: visualstudio.detect failed for VS 2015

GitHub Issuen/a
TypeBug
PriorityHigh
StatusClosed
ResolutionFixed
Resolution Date2016-04-06T05:48:15.000+0000
Affected Version/sRelease 5.0.2
Fix Version/sRelease 5.3.0, windowslib 0.4.5
ComponentsTooling, Windows
Labelsqe-5.3.0
ReporterKota Iguchi
AssigneeGary Mathews
Created2015-10-06T05:26:37.000+0000
Updated2016-04-14T18:26:49.000+0000

Description

windowslib.visualstudio.detect failed to detect Visual Studio 2015, when it is installed to the path which contains space.
PS > npm run-script test-visualstudio

> windowslib@0.1.15 test-visualstudio windowslib
> mocha --require test/init --reporter spec --check-leaks test/test-visualstudio



  visualstudio
    √ namespace should be an object
    1) detect should find Visual Studio installations


  1 passing (500ms)
  1 failing

  1) visualstudio detect should find Visual Studio installations:
     Uncaught AssertionError: expected null to be a string
      at Assertion.fail (windowslib\node_modules\should\lib\assertion.js:113:17)
      at Assertion.prop.(anonymous function) [as String] (windowslib\node_modules\should\lib\ass
ertion.js:39:14)
      at checkVisualStudio (windowslib\test\test-visualstudio.js:73:42)
      at windowslib\test\test-visualstudio.js:34:4
      at finalize (windowslib\lib\visualstudio.js:64:4)
      at windowslib\lib\visualstudio.js:218:5
      at done (windowslib\node_modules\async\lib\async.js:132:19)
      at windowslib\node_modules\async\lib\async.js:32:16
      at windowslib\lib\visualstudio.js:187:10
      at ChildProcess.<anonymous> (windowslib\node_modules\node-appc\lib\subprocess.js:60:3)
      at ChildProcess.EventEmitter.emit (events.js:98:17)
      at maybeClose (child_process.js:753:16)
      at Process.ChildProcess._handle.onexit (child_process.js:820:5)
It is because some spaces in vcvarsall variable is not properly escaped.

output from console.log(vcvarsall);

C:\PROGRA~2\Microsoft Visual Studio 14.0\VC\vcvarsall.bat
I was able to fix it locally, here's a PR: https://github.com/appcelerator/windowslib/pull/22

Comments

  1. Kota Iguchi 2015-10-07

    https://github.com/appcelerator/windowslib/pull/22
  2. Ewan Harris 2015-11-03

    Verified using: Windows 10 Pro Appc Core: 5.1.0-42 Appc NPM: 4.2.1 Ti SDK: 5.1.0.v2015102819002 When running appc ti info Visual Studio 2015 is detected and when running the Visual Studio tests in windowslib they now pass Closing ticket
  3. Gary Mathews 2016-04-06

    windowslib: https://github.com/appcelerator/windowslib/pull/35 titanium_mobile: https://github.com/appcelerator/titanium_mobile/pull/7918 titanium_mobile_5_3_X: https://github.com/appcelerator/titanium_mobile/pull/7919
  4. Harry Bryant 2016-04-14

    Verified as fixed, running appc ti info Visual Studio 2015 is detected. Additionally experienced in issue with MSBuild detection when Visual Studio was installed on a secondary drive, but this issue has now been addressed. Tested on: Windows 10 Home & Pro Appc Studio: 4.6.0.201604141457 Ti SDK: 5.3.0.v20160414094426 Appc NPM: 4.2.5-1 Appc Core: 5.3.0-12 Node: v4.4.2 *Closing Ticket.*

JSON Source