Deploy assembly containing IWizard for project template with VSIX

前端 未结 3 777
天命终不由人
天命终不由人 2021-02-05 19:03

I have created an extension for VS 2010 that deploys a project template. The project template uses a custom wizard (in a specific assembly) that is called when I create a new pr

3条回答
  •  梦如初夏
    2021-02-05 19:44

    I had no luck with the Assembly element technique to work, so in case anyone else runs into the same problem, here's another solution.

    Visual Studio looks for wizard DLLs using the BindingPaths registry key. If you add the folder containing your DLL in a subkey of BindingPaths, then Visual Studio will find your DLL.

    To do this from a VSIX, create a .pkgdef file in your VSIX project. Set its Include in VSIX property to True, and paste the following text into it:

    [$RootKey$\BindingPaths\{XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX}]
    "$PackageFolder$"=""
    

    (where the Xs represent the package GUID, though I suspect any GUID will do).

提交回复
热议问题