13

I just installed both Visual studio 2015 and visual studio cordova tools. It wrked fine and i was able to create a project with it.

I then installed ionic cli, and suddenly i am getting the error

SetSite failed for package [ApacheCordovaToolsPackage]

I have tried repairing Visual studio and cordova tools to no avail. Any help?

Layinka
  • 405
  • 1
  • 4
  • 13
  • I've run into the same issue after installing the Win10 SDK. – Stephen Cleary Aug 05 '15 at 03:12
  • 1
    Today I let VS install the updates to the TypeScript tools and the Cordova tools. Afterward I started hitting this, and the JS language service seems totally busted (and JS doesn't even show up in Options -> Text Editor under languages). So who totally hosed VS? Cordova or TypeScript? – Brandon Paddock Aug 09 '15 at 00:00

2 Answers2

18

The steps in this MSDN forum post worked for me. Reproducing for Googleability:

Find the installer for Visual Studio 2015 in your installer cache.

cd /d "%ProgramData%\Package Cache"
dir vs*exe /s /b

Find the path to vs_community.exe, vs_professional.exe, or vs_enterprise.exe, and copy that path.

(I found my vs_enterprise.exe at C:\ProgramData\Package Cache\{a60a492e-b5eb-4218-a9e6-f38d18a7dbaf}\vs_enterprise.exe)

CD into that path, e.g.,

cd {a60a492e-b5eb-4218-a9e6-f38d18a7dbaf}

Execute the installer with the options /modify /installselectableitems Javascript, e.g.,

vs_enterprise.exe /modify /installselectableitems Javascript

In Visual Studio setup, select Modify then Update, without changing any feature selections.

Then:

cd C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE
devenv /updateconfiguration
devenv /clearcache
Stephen Cleary
  • 437,863
  • 77
  • 675
  • 810
  • As a side note, the VS Android emulator was still giving me an error on startup ("Couldn't change Display controller settings of the virtual machine"). After deleting the Android VM from Hyper-V Manager, it started working again. – Stephen Cleary Aug 05 '15 at 13:50
  • 2
    I've been trying all morning to solve this, yours was the only fix that worked, thanks! – GONeale Aug 05 '15 at 23:41
  • 3
    Thanks, thanks. I almost gave up on this. i didnt that a new product will have this kind of issue – Layinka Aug 06 '15 at 18:58
  • I really don't recommend using VS tools for cordova/ionic, it is very buggy and won't give you the same flexibility as the cli tools. – gafi Aug 10 '15 at 08:31
  • Worked for me, Thanks! – vamyip Oct 15 '15 at 07:07
  • If I do not change feature selection, the Update button remains disabled. I think I'll need to choose Repair instead. – dotNET Aug 02 '17 at 03:34
10

The solution in Error adb.exe when running Visual Studio 2015 RC worked for me. In short:
Delete this folder: C:\Users[username]\appdata\local\microsoft\VisualStudio\14.0\ComponentModelCache

Then open a new project get the folder rebuild by VS.

Community
  • 1
  • 1
Dr. Magoo
  • 101
  • 1
  • 2
  • 1
    I had a similar problem with Visual Studio 2019 and `IntelliCodeCppPackage`. In the case of my 2019 install, the cache was in `16.0_1c277db3`, but you should just look for whatever folder. – MikeBaz - MSFT Aug 26 '19 at 23:43