1

我正在尝试使用带有 VS.NET 13 的 Visual Studio Add In 项目模板创建 SSMS 2008 插件。我已按照CodeProject本教程中的说明进行操作。但是,本教程适用于 SSMS 2012,文件夹结构与 SSMS 2008 的文件夹结构有很大不同。我的问题是:我应该将 .addin 文件放在哪里以使 SSMS 2008 使用它?
另外,这是我创建的注册表项

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SQL Server\100\Tools\Shell\Addins\AddInName.Connect

Connect 是为插件与主机应用程序连接提供逻辑的类的名称。这个对吗?
提前致谢!

4

1 回答 1

1

SSMS 2008 不需要.addin文件。您创建的正确注册表项和相应的 CLSID 注册应该足够了。

这是我在 Tabs Studio 插件(msi、wix、当前用户安装程序)中使用的:

  <Component Id="TabsStudioSSMS2008Component" Guid="986C2BFA-4C21-42e4-96B3-7C0178B841DC">
    <RegistryKey Root="HKCU" Key="Software\Sergey Vlasov\Tabs Studio\Installer">
      <RegistryValue Type="integer" Name="SSMS2008" Value="1" KeyPath="yes"/>
    </RegistryKey>

    <RegistryKey Root="HKCU" Key="Software\Microsoft\Microsoft SQL Server\100\Tools\Shell\Addins\TabsStudio.Connect">
      <!--<RegistryValue Type="integer" Name="LoadBehavior" Value="3"/>-->
      <RegistryValue Type="string" Name="LoadBehavior" Value="[SSMS2008LOADBEHAVIOR]"/>
    </RegistryKey>

    <RegistryKey Root="HKCU" Key="Software\Classes\CLSID\{E52044B6-1EBA-4D82-AF2A-FABE2A79B106}">
      <RegistryValue Type="string" Value="TabsStudio.Connect"/>
    </RegistryKey>
    <RegistryKey Root="HKCU" 
                 Key="Software\Classes\CLSID\{E52044B6-1EBA-4D82-AF2A-FABE2A79B106}\Implemented Categories\{62C8FE65-4EBB-45e7-B440-6E39B2CDBF29}" 
                 Action="createAndRemoveOnUninstall">
    </RegistryKey>
    <RegistryKey Root="HKCU" Key="Software\Classes\CLSID\{E52044B6-1EBA-4D82-AF2A-FABE2A79B106}\InprocServer32">
      <RegistryValue Type="string" Value="mscoree.dll"/>
      <RegistryValue Type="string" Name="ThreadingModel" Value="Both"/>
      <RegistryValue Type="string" Name="Class" Value="TabsStudio.Connect"/>
      <RegistryValue Type="string" Name="Assembly" Value="TabsStudio, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null"/>
      <RegistryValue Type="string" Name="RuntimeVersion" Value="v2.0.50727"/>
      <RegistryValue Type="string" Name="CodeBase" Value="[PersonalFolder]Visual Studio 2008\Addins\TabsStudio.dll"/>
    </RegistryKey>
    <RegistryKey Root="HKCU" Key="Software\Classes\CLSID\{E52044B6-1EBA-4D82-AF2A-FABE2A79B106}\InprocServer32\1.0.0.0">
      <RegistryValue Type="string" Name="Class" Value="TabsStudio.Connect"/>
      <RegistryValue Type="string" Name="Assembly" Value="TabsStudio, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null"/>
      <RegistryValue Type="string" Name="RuntimeVersion" Value="v2.0.50727"/>
      <RegistryValue Type="string" Name="CodeBase" Value="[PersonalFolder]Visual Studio 2008\Addins\TabsStudio.dll"/>
    </RegistryKey>
    <RegistryKey Root="HKCU" Key="Software\Classes\CLSID\{E52044B6-1EBA-4D82-AF2A-FABE2A79B106}\ProgId">
      <RegistryValue Type="string" Value="TabsStudio.Connect"/>
    </RegistryKey>

    <RegistryKey Root="HKCU" Key="Software\Classes\TabsStudio.Connect">
      <RegistryValue Type="string" Value="TabsStudio.Connect"/>
    </RegistryKey>
    <RegistryKey Root="HKCU" Key="Software\Classes\TabsStudio.Connect\CLSID">
      <RegistryValue Type="string" Value="{E52044B6-1EBA-4D82-AF2A-FABE2A79B106}"/>
    </RegistryKey>
  </Component>
于 2016-10-07T04:09:09.053 回答