Hello everyone,
I'm trying to transit between visual studio 2013 add-ins and 2015 version. My add-ins work well in 2013 version, but in 2015 version, add-ins was deprecated. But before asking few question, I'm going to make you the difference between theold simple style and the newautomated complex style.
Old Simple Version of 2013
C++ DLL Project CoreXWizard.h ifndef CoreXWizard_H public ref class CoreXWizard : public IDTWizard //CPP FUNCTION... #endif FuncDec.h ifndef FuncDec_H public ref class FuncDec : public IDTExtensibility2 , public IDTCommandTarget //CPP FUNCTION... #endif MyForm.h ifndef MyForm_H public ref class MyForm : public Form //CPP FUNCTION... #endif End DLL Project
In this version, we can see that we have a class for each function in package. The wizard class derived from IDTWizard and the command class derived from IDTComandTarget. To install it you must copy .Addins files inside Addins Folder and the .vsz inside Wizard Folder. You must also RegAsm the DLL to make it work.
THE .VSZ FILES VSWizard 7.0 Wizard=VSSuperPack.CoreXWizard Param=First Items Param=Second Items THE .ADDINS FILES <?xml version="1.0" encoding="utf-16" standalone="no"?><Extensibility xmlns="http://schemas.microsoft.com/AutomationExtensibility"><HostApplication><Name>Microsoft Visual Studio</Name><Version>14.0</Version></HostApplication><Addin><FriendlyName>Function Description</FriendlyName><Description>Auto comment function</Description><Assembly>VSSuperPack.dll</Assembly><FullClassName>VSSuperPack.FuncDescript</FullClassName><LoadBehavior>0</LoadBehavior><CommandPreload>1</CommandPreload><CommandLineSafe>0</CommandLineSafe></Addin></Extensibility>
If you remark the add-ins and the wizard point to namespace.class. For IDTWizard class everything pass by Execute. For the Command class two function was important, the OnConnection and Exec. It's by the OnConnection function that you add your entry menu inside visual studio interface.
Verdict:
Wizard working in Visual Studio 2013 and 2105.
Command working only in 2013, no menu entry for 2105
You can find the example on my
git hub
Complex version of VSIX
C++ DLL Project CPP, DEF IDL pkgdef and automated GUID End DLL Project C++ DLL Project VSCT Files and Menu Entry for UI End DLL Project VSIX Project Reference of both preview dll End VSIX Project
On this form, we have a dll for the code and a dll for the menu enty. The vsix project was the auto-deploy result. Ok, for this moment, it's was simple. The problem is that a lot of element was linked to GUID number generated
by the c# way. But I'm on c++ way and we can't add command menu or tool menu component. For the VSIX part, it's was great, because we don't need to create deploy solution.
Question: GIT EXAMPLE
- Wizard is not support in new extensibility c++ project. Does it's possible to modify VSIX manifest to deploy wizard?
- Does it's possible to flush vsct to pass by OnConnection mode and add entry with c++ function or modify the vsct to connect on a namespace.class like old style?
- If I want make a custom property for my wizard how I must process?
Thanks!