VSIX package build failed without showing the reason (Visual Studio bug)
Asked Answered
H

2

11

I have to enabled diagnostic mode of MSBuild project build output verbosity to see this:

1>Done executing task "EnableExtension" -- FAILED. (TaskId:81)
1>Done building target "DeployVsixExtensionFiles" in project "myextension.csproj" -- FAILED.: (TargetId:93)
...
1>Build FAILED.
1>
1>Time Elapsed 00:00:01.27
========== Rebuild All: 0 succeeded, 1 failed, 0 skipped ==========

My problem is I cannot debug the Visual Studio extension package I'm working on, as the build output says something has failed. What's wired, the obj and bin folders with all content inside (including vsix package), has been created. I don't really know what special I've changed, because few hours ago everything was fine.

How can I investigate what has gone wrong ?

Btw: I'm using VS 2012 Premium Update 1

EDIT:

I remembered what I've done. While being in debug mode, I entered Tools -> Extensions and Updates, and uninstalled my currently debugged extension (without restarting VS after that operation). Further attempt of debugging (F5 after CLOSING Experimental Instance of VS) results in this mysterious build behavior.

Humankind answered 1/4, 2013 at 16:36 Comment(0)
H
26

My current workaround I've come up with after some time is to change the display name of the extension package in the source.extension.vsixmanifest file:

  <Metadata>
    ...
    <DisplayName>Change this name to sth else and press F5</DisplayName>
    ...
  </Metadata>

Nothing else needs to be changed (unfortunately reversion to old name still fires this error, but at least developing and debugging can be continued).

UPDATE:

I've checked the windows registry for such problematic name, and found following PendingDeletions key:

HKEY_USERS\S-1-5-21-1832937852-2116575123-337272265-599953\Software\Microsoft\VisualStudio\11.0Exp\ExtensionManager\PendingDeletions

Under this key there is value pointing at my extension I've previously uninstalled (while being in the debug mode):

C:\USERS\G_159\APPDATA\LOCAL\MICROSOFT\VISUALSTUDIO\11.0EXP\EXTENSIONS\JAROSLAW WALISZKO\MYEXTENSION\1.0\

Removal of this entry fixes that case.

Humankind answered 1/4, 2013 at 17:33 Comment(2)
There was no rogue reference in the registry for me, but I manually installed my VSIX into my main VS, then copied it from APPDATA\LOCAL\MICROSOFT\VISUALSTUDIO\11.0\EXTENSIONS into the 11.0EXP folder and the build started working again - I could then uninstall the VSIX from my main VS instance.Chambers
Another solution is to manually open the Visual Studio Experimental instance. Starting it cause all the pending extensions to be deleted automatically.Upheave
P
1

Davide Icardi commented:

Another solution is to manually open the Visual Studio experimental instance. Starting it caused all the pending extensions to be deleted automatically.

To start the experimental instance, run this command in a developer command prompt:

devenv.exe /RootSuffix Exp

Update: I'm dumb - after installing the VS 2013 SDK, there's a shortcut to start the experimental instance in the Visual Studio 2013 folder of the Start menu.

Protohuman answered 17/11, 2014 at 16:49 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.