Search code examples
.netvisual-studiovsix

Process.Start vsix-file from extension. Already installed error


I'm trying to install an extension (via a .vsix-file) from within an extension, but it fails with the message: "This extension is already installed to all applicable products".

From within the VS extension, if some button is pressed, the following code is executed:

var file = "myFile.vsix";
Process.Start(file);

This starts the VsixInstaller but it ends with the message "This extension is already installed to all applicable products".

However, if I just 'double-click' myFile.vsix, the installation works as expected.

Furthermore, if I create a simple console-application and execute the same code, it also works as expected. (Also tried running this console-app from a visual studio command prompt; works as expected)

Any pointers on why the VsixInstaller would behave any differently when started from within an extension?

Note: The extension is applicable to VS2013 and VS2017, I tried the things above in both versions.


Solution

  • Problem was found. The filepath was not the same in every case..

    Everything works as expected now