[TIMOB-20057] Windows: Unable to build for any platform if there is no Visual Studio installed
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | Critical |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2015-11-24T19:12:30.000+0000 |
Affected Version/s | Release 5.1.0 |
Fix Version/s | Release 5.1.1 |
Components | Tooling, Windows |
Labels | n/a |
Reporter | Chee Kiat Ng |
Assignee | Christopher Williams |
Created | 2015-11-24T09:04:11.000+0000 |
Updated | 2016-06-08T15:30:06.000+0000 |
Description
Ensure there are no versions of Visual Studio installed.
Attempt to build. There is an error of:
C:\ProgramData\Titanium\mobilesdk\win32\5.1.0.GA\windows\cli\commands\_build\config\vstarget.js:13
var defaultTarget = this.windowsInfo.selectedVisualStudio.version;
TypeError: Cannot read property 'version' of null
See this link https://community.appcelerator.com/topic/4128/issues-with-update-from-4-x-to-5-1
I have rolled back the installer versions to 0.12.7 in the meantime while we diagnose the issue.
The problem is because the Windows build doesn't check if the
this.windowsInfo.selectedVisualStudio
is not null: https://github.com/appcelerator/titanium_mobile_windows/blob/master/cli/commands/_build/config/vstarget.js#L13. Also, the Windows build should set thedefaultTarget
value toundefined
ifthis.windowsInfo.selectedVisualStudio
is not valid:Apparently the user hard coded the
defaultTarget
to 11 which implies he's using Visual Studio 2012. Windows lib should be able to detect VS2012 installs, however the Titanium Mobile Windows platform is only compatible with Visual Studio 2013: https://github.com/appcelerator/titanium_mobile_windows/blob/master/package.json#L27. That explains why there were no Visual Studios found. If the user would runti info
, they would see that their environment is not supported.PRs are already merged to 5_1_X and master streams.
Verified using: OS: Microsoft Windows 10 Pro Appc core: 5.1.0 Appc NPM: 4.2.2 Ti SDK: 5.1.1.GA Appc Studio: 4.4.0.201511241829 When Visual Studio is not installed, building for another platform no longer fails. Closing ticket