locked
VSIX registration and unregistration issue RRS feed

  • Question

  • I'm having some problems when registering and unregistering an extension in Visual Studio 2012 / 2013. The issue is the following:

    1.- Register an extension:

    vsixinstaller.exe myvsixpackage.vsix
    

    A directory is created in my local folder, under C:\Users\xxx\AppData\Local\Microsoft\VisualStudio\12.0\Extensions.

    2.- Unregister the extension:

    vsixinstaller.exe /u:myvsixID
    

    This unregisters the extension, but it does not remove the extension assemblies; When I restart Visual Studio and plugins are loaded, the files are removed. It seems that the extensions is marked to be removed later.

    3.- Register the extension again.

    vsixinstaller.exe myvsixpackage.vsix
    

    I get the error: "This extension is already installed to all available products".

    But if I open VS2013 the extension is not there. Eventually I cannot even unregister it (VSIX installer says that the extension was already uninstalled) and I have to remove the directory manually so that I can register my extension again.

    Is there any workaround for this? Is it a bug? Am I doing something wrong?

    Friday, January 10, 2014 1:19 PM

Answers

  • Hi, Jane, it seems that I found a proper solution, but I'd like to share it with you, in case it's not a good one: the trick is running:

    devenv /setup /nosetupvstemplates

    This runs the IDE, updating the proper Extensions, but without showing it to the user (which is the solution we want: register / unregister silently). It takes some time, but it works.

    Could you tell me if you see any problem in using it?

    Thanks for your time,

    Luis

    Wednesday, January 15, 2014 8:30 AM

All replies

  • Hello,

    Welcome to MSDN forum.

    >>I'm having some problems when registering and unregistering an extension in Visual Studio 2012 / 2013.

    Did this issue occur in both Visual Studio 2012  and Visual Studio 2013 ?

    Have you tried to restart Visual Studio after using the command "vsixinstaller.exe /u:myvsixID"?

    Because "The files are actually physically deleted the next time VS is restarted, not when VSIXInstaller /u runs. Using your VSIX the behavior I saw was that after running the /u command, your extension was deleted during VS restart. "

    For more details,please refer to VSIXInstaller /u doesn't remove files, just unregisters it with VS2010 .

    You can also check the discussions in the related topic below:

    Pushing updates of custom packages

    If this problem remains unresolved, please provide more details about the log message for further analysis.

    Best Regards,

    Jane.



    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Monday, January 13, 2014 1:55 AM
  • Hello, Jane:

    I noticed that restarting Visual Studio actually removed the files, the problem is that we distribute the Visual Studio package in our installer; this can lead to failing scenarios where you install, uninstall and install again without restarting Visual Studio during the process. This causes problems with the registration of the plugin, as explained above. The result of this scenario is that the plugin is not registered again, so the user will get confused.

    Is there any workaround or should we publish our plugin in the Visual Studio Gallery and let Visual Studio handle the installation / uninstallation of the plugin?

    Thanks,

    Luis


    • Edited by Ravelus Monday, January 13, 2014 8:51 AM
    Monday, January 13, 2014 8:51 AM
  • Hi Luis,

    Thanks for your feedback.

    Please forgive my poor understanding, could you clarify the following questions?

    • Did you create this extension for both Visual Studio 2012  and Visual Studio 2013 ?
    • How did you design the VSIX Manifest? Did you assign the the specific version of Visual Studio?

    • Did you have Visual Studio 2012  and Visual Studio 2013 installed on the same machine?
    • What were the results of this extension you could find on Extensions and Updates window after installation and uninstallation  in both of the versions of Visual Studio?
    • Have you checked the replies in Pushing updates of custom packages and tried /quiet mode with other command line options?

    Based on my knowledge, I think to restart Visual Studio and to remove the remaining files is normal behavior because Visual Studio should keep a clean environment to receive the new modification.

    Best Regards,

    Jane.

     


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Tuesday, January 14, 2014 7:48 AM
  • Did you create this extension for both Visual Studio 2012  and Visual Studio 2013 ?

    Yes.

    How did you design the VSIX Manifest? Did you assign the the specific version of Visual Studio?

    Yes:

    <SupportedProducts>
          <VisualStudio Version="11.0">
            <Edition>Pro</Edition>
          </VisualStudio>
          <VisualStudio Version="12.0">
            <Edition>Pro</Edition>
          </VisualStudio>
          <IsolatedShell Version="5.0">AVRStudio</IsolatedShell>
          <IsolatedShell Version="5.1">AVRStudio</IsolatedShell>
          <IsolatedShell Version="6.0">AtmelStudio</IsolatedShell>
        </SupportedProducts>

    , but I think that this is not the issue, since the plugin is correctly registered in a normal scenario.

    Did you have Visual Studio 2012  and Visual Studio 2013 installed on the same machine?

    No, just Visual Studio 2013.

    What were the results of this extension you could find on Extensions and Updates window after installation and uninstallation  in both of the versions of Visual Studio?

    The registration / unregistration is fine as long as you open Visual Studio.

    Have you checked the replies in ... and tried /quiet mode with other command line options?

    /q = quiet is just quiet, but does not solve the problem.

    What I want to do is the following: since our Visual Studio package is integrated in our installer, we want to smoothly install and uninstall it, without having to restart Visual Studio, if that's possible. Otherwise we'll need to think about better approaches, such as not including the plugin in our installer but publish it in the Visual Studio Gallery, for example.

    Is there any option / modifier to launch Visual Studio quietly and stop it or the routine that performs any registration / unregistration or any option that may do the trick?

    Thanks,

    Luis


    • Edited by Ravelus Tuesday, January 14, 2014 11:23 AM
    Tuesday, January 14, 2014 10:49 AM
  • Hi Luis,

    I have delivered this case to the team members who have rich technical experience for better suggestions, which might take some time.

    All of us here are appreciating your patience.

    Sincerely,

    Jane.


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Wednesday, January 15, 2014 3:30 AM
  • Hi, Jane, it seems that I found a proper solution, but I'd like to share it with you, in case it's not a good one: the trick is running:

    devenv /setup /nosetupvstemplates

    This runs the IDE, updating the proper Extensions, but without showing it to the user (which is the solution we want: register / unregister silently). It takes some time, but it works.

    Could you tell me if you see any problem in using it?

    Thanks for your time,

    Luis

    Wednesday, January 15, 2014 8:30 AM