سؤال

I'm working manually the vsixmanifest of a VSIX extension package, is this:

<?xml version="1.0" encoding="utf-8"?>
<Vsix Version="1.0.0" xmlns="http://schemas.microsoft.com/developer/vsx-schema/2010">
  <Identifier Id="c669b00e-3746-47bd-bfe7-e6f9d64458ff">
    <Name>RapidDesign</Name>
    <Author>ZUI INFRA sp z o. o.</Author>
    <Version>2.0.1</Version>
    <Description>RapidDesign allows you to use various VisualStudio designers faster.</Description>
    <Locale>1033</Locale>
    <MoreInfoUrl>http://www.rapiddesignaddin.com</MoreInfoUrl>
    <License>EULA.txt</License>
    <Icon>Speedometer.png</Icon>
    <PreviewImage>RapidDesignPreview.png</PreviewImage>
    <InstalledByMsi>false</InstalledByMsi>
    <SupportedProducts>
      <VisualStudio Version="12.0">
        <Edition>Ultimate</Edition>
      </VisualStudio>
    </SupportedProducts>
    <SupportedFrameworkRuntimeEdition MinVersion="4.0" MaxVersion="4.0" />
  </Identifier>
  <References>
    <Reference Id="Microsoft.VisualStudio.MPF" MinVersion="10.0">
      <Name>Visual Studio MPF</Name>
    </Reference>
  </References>
  <Content>
    <VsPackage>RapidDesign.pkgdef</VsPackage>
  </Content>
</Vsix>

There is a way to tell the VSIX installer to run automatically a CMD command or an executable file, like a kind of post-installation step?

For example I would like to run/install a registry script (.reg file) that configures some default extension options for me, but I don't know if that process can be done automated from the vsixmanifest launching a console command or an EXE process previously programmed.

هل كانت مفيدة؟

المحلول

A vsix package shouldn't rely on the registry for its settings, there is a specific API to access the Visual Studio settings systems. A normal vsix package cannot call or start anything after deployment. You can let the package itself setup defaults the first time it is started.

If you really need more advanced things during your setup, you can create a .msi instead of a vsix. You'll need to extract your vsix and include its contents in your Windows Installer package. Or you can use WixToolset to create a MSI installer and use the <VsixInstaller> element to register the Visual Studio Package, you can put the other logic in the Wix installer project.

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top