Question

I have written a custom tool for Visual Studio, compiled to a VSIX and uploaded to the Visual Studio Gallery. It all works fine, as long as Visual Studio restarts after the extension is added to the dev environment. The problem is I'm not sure how to flag my package as requiring a restart.

It seems like this should be a simple XML attribute in the .vsixmanifest or something, but I cannot find it, I've probably just been staring at the problem for too long.

Anyone know how to indicate this in a package?

The extension is called JsBuildTools on Visual Studio Gallery, the source is on GitHub if you need to look at the source.

Was it helpful?

Solution

There is no content defined in your extension, so I think it automatically assumes no restart is required. Unfortunately MSDN content element documentation is not very verbose on the subject, but it does say:

Technically, the Content element is optional. However, a VSIX package that does not have a Content element, or has an empty Content element, will not install anything except dependencies.

For example add something like this in your content element to your vsixmanifest to make it provide a VsPackage:

<Content>
  <VsPackage>|%CurrentProject%;PkgdefProjectOutputGroup|</VsPackage> 
</Content>

This is the same as editing vsixmanifest from within VS, click "Add Content", Select Content Type "VS Package" and your project selected as the content. Not knowing exactly what your extension does other options might apply better.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top