Ask a questionAsk a question
 

AnswerHow to add a VsPackage using C++ to a new Isolated Shell

  • Wednesday, October 28, 2009 10:54 AMHenry2323 Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    Hi,

    I created a new VS Isolated Shell project and got 4 projects. ShellExtensionsVSIX, VSShellStub2, VSShellStub2.AboutBoxPackage and VSShellStub2UI
    When I added a VSPackage project using C#, all is fine. I added this one to the ShellExtensionsVSIX project using the AddContent button of the vsixmanifest designer.
    When I do exactly the same using C++ for the package. The package is not loaded when the shell starts. And I got an exclamation mark at the reference of VSPackageCpp under the ShellExtensionsVSIX project.
    Are any other steps necessary?

    Thanks for help!
    •  

Answers

  • Wednesday, November 04, 2009 5:14 AMSaurabh Jain VSMSFT, OwnerUsers MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     Answer

    Here are steps to do this in Beta2. We are working on making it simpler for RTM.

    After adding a new C++ package project to the solution, do the following.

    (i) Open ShellExtensionsVSIX project properties and select the VSIX tab. In the text box that has the path to output location, add a "\" after the "...\Application".
    (ii) Open the Source.Extension.vsixmanifest file in this project, open Add Content, select VSPackage and point it to newly added C++ package (If you kept the default names, it will called vspakage1).
    (iii) Add a project to project reference from ShellExtensionsVSIX to UI project of the new added C++ package (it will called vspackage1UI).
    (iv) Unload the ShellExtensionVSIX project (right click on the ShellExtensionsVSIX project, and click unload project).
    (v) Open the unloaded project in the editor (right click and select edit project). Add the following element to the the Project to project reference for the UI project (Add it after <Name>VSPackage1UI</Name>).

    <VSIXSubPath>1033</VSIXSubPath>

    (vi) Reload and build.

    --
    Regards,
    Saurabh

    http://blogs.msdn.com/saurabhjain

All Replies

  • Wednesday, November 04, 2009 5:14 AMSaurabh Jain VSMSFT, OwnerUsers MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     Answer

    Here are steps to do this in Beta2. We are working on making it simpler for RTM.

    After adding a new C++ package project to the solution, do the following.

    (i) Open ShellExtensionsVSIX project properties and select the VSIX tab. In the text box that has the path to output location, add a "\" after the "...\Application".
    (ii) Open the Source.Extension.vsixmanifest file in this project, open Add Content, select VSPackage and point it to newly added C++ package (If you kept the default names, it will called vspakage1).
    (iii) Add a project to project reference from ShellExtensionsVSIX to UI project of the new added C++ package (it will called vspackage1UI).
    (iv) Unload the ShellExtensionVSIX project (right click on the ShellExtensionsVSIX project, and click unload project).
    (v) Open the unloaded project in the editor (right click and select edit project). Add the following element to the the Project to project reference for the UI project (Add it after <Name>VSPackage1UI</Name>).

    <VSIXSubPath>1033</VSIXSubPath>

    (vi) Reload and build.

    --
    Regards,
    Saurabh

    http://blogs.msdn.com/saurabhjain