locked
How to register VSPackage in Visual Studio Isolated shell RRS feed

  • Question

  • I have VSPackage that right now I can get it to work only from within Visual Studio (Debug->Run)

    This VSPackage is basically to create new project type and it's based on MPF in Visual Studio 2013.

    Now the question is, I want to include this VSPackage inside a project of Isolated VS Shell, how can I do that?

    Thank you

    Wednesday, February 12, 2014 7:12 AM

Answers

  • Hi,

    I downloaded the project.

    I notice the source.extension.vsixmanifest file in ShellExtensionsVSIX.

    Here is the screenshot of the file "Install Targets" dialog.

    You should change the Identifier to a identifier that exist in the product identifier list as below.

    Best regards,


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    • Marked as answer by Anna Cc Saturday, June 28, 2014 10:07 AM
    Wednesday, June 25, 2014 11:16 AM

All replies

  • Include your VS package in the same solution as the Shell.

    Add it to the source.extension.vsixmanifest file in the ShellExtensionsVSIX project by adding the project into the Content section.

    In your VSPackage, open the vsixmanifest file.  Press the Select Editions button, then enable Visual Studio Isolated Shell and list your Shell name and version number.  (name = 'AppName' version = 'ProductVersion' in the Application.pkgdef file)

    ie:

    That's pretty much it.


    • Proposed as answer by FBNitro Wednesday, February 12, 2014 10:02 PM
    • Edited by FBNitro Wednesday, February 12, 2014 10:03 PM
    • Unproposed as answer by Mohamed Meshref Thursday, February 13, 2014 2:22 AM
    Wednesday, February 12, 2014 10:02 PM
  • Where I can find the "Select Edition" Button?
    Thursday, February 13, 2014 2:17 AM
  • This is 2013 not 2010
    Thursday, February 13, 2014 2:20 AM
  • If not one else replies, I'm setting up a 2013 install on Monday, I can check then.

    • Edited by FBNitro Friday, February 14, 2014 1:55 AM
    Friday, February 14, 2014 1:41 AM
  • That would be super :)
    Friday, February 14, 2014 1:42 AM
  • I was pretty close with the VS2010 answer I gave previously.  They've made some small adjustments, but generally it's the same:

    • Create a new VSShell Isolated Solution
    • Add your existing VSPackage to it.
    • Expend the the ShellExtensionsVSIX project and double click the source.extension.vsixmanifest file.
    • Note the version # in the top right corner of this screen (as I find out later, doesn't seem as important anymore, this can be ignored. but if you're having troubles, try making the version #'s match)
    • Select Assets on the left.
    • Press New and populate the dialog (similar to shown below, in my case, the Package I added was named VSPackage1):
    • Next, expand your VSPackage
    • Open the source.extension.vsixmanifest file
    • Select Install Targets from the left
    • Hit New, and Select the IntegratedShell.  The version range seems to not matter so much in 2013, as I just left it with the default values... previously this would have to change to match the version # in the VSIXmanifest of the shell.
    • Next rebuild all, then run the debugger.
    • Your package should now be available in the shell.  (In my case I added in the sample editor)  So I can add a new file, the new file type appears, I can select it and the new editor appears.  And I'm doing this all from within the Shell. (I would attach an image, but the Message Board only allows 2 images/message)

    Adding any kind of package to the VSShell goes through the same steps.  I have a Shell project with 22 packages in it... including several editors, a heavily customized MPF project, a completely custom Source Control system and a Language Service.  Each of them are all registered the same way as I've listed here. 

    Hope it helps you out.

    • Proposed as answer by FBNitro Monday, February 17, 2014 5:09 PM
    Monday, February 17, 2014 5:08 PM
  • For some reason it's not working for me :(

    Should I send you a copy of my project?

    Tuesday, February 18, 2014 3:56 AM
  • Hi Mohamed,

    According to your description, I guess you want to add a VSPackage to a Isolated Shell project.

    You can add a VSPackage to your isolated shell application. Please refer to this document "Extending the Isolated Shell".

    If I misunderstand you, please feel free to let me know.

    Best regards,

    Sunny

    Thursday, February 20, 2014 5:43 AM
  • I did all of that before but it is still not working :(
    Thursday, February 20, 2014 5:44 AM
  • Hi,

    Could you please clarify your sentence " but it is still not working"?

    Do you mean that you can not add a VSPackage to a Isolated Shell project, or you add a VSPackage but can not make it work?

    Best regards,

    Sunny

    Thursday, February 20, 2014 5:47 AM
  • the package doesn't appear in the shell when I run it
    Thursday, February 20, 2014 6:02 AM
  • Hi,

    I have tested to add a VSPackage to a Isolated Shell project successfully.

    The screenshot below is the result.

    1) I create a VSPackage refer to this document.

    2) I create a Isolated Shell Application refer to this document

    Please take the following steps to add a VSPackage to your isolated shell application.

    • Add your existing VSPackage to the solution of your Isolated Shell project.
    • In the ShellExtensionsVSIX project, open the source.extension.vsixmanifest file. The Assets section should contain an entry for the VSShellStub.AboutBoxPackage project.
    • Choose the New button.
    • In the Add New Asset window, in the Type list, select Microsoft.VisualStudio.VsPackage.

    • In the Source list, make sure that A project in the current solution is selected. In the Project list box, select your package.

    • Save and close the file.

    Best regards,

    Sunny

    Thursday, March 6, 2014 7:27 AM
  • I did the exact same and it's not working for me. Maybe because my VSPackage is different as it adds new projects types
    Friday, March 7, 2014 2:17 AM
  • Hi,

    >>Maybe because my VSPackage is different as it adds new projects types

    I guess maybe not. Please make sure that your VSPackage works fine first.

    Could you please provide us with a sample code? If you want to share your demo project, you can paste the onedrive link here and we will troubleshot this issue.

    Best regards,

    Sunny

    Friday, March 7, 2014 2:25 AM
  • That's the whole project:

    https://onedrive.live.com/redir?resid=A55D863E137BAC0!1213&authkey=!ALoNqZZh_Kx6Wfw&ithint=file%2c.zip

    Friday, March 7, 2014 6:54 AM
  • Hi,

    I downloaded the project.

    I notice the source.extension.vsixmanifest file in ShellExtensionsVSIX.

    Here is the screenshot of the file "Install Targets" dialog.

    You should change the Identifier to a identifier that exist in the product identifier list as below.

    Best regards,


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    • Marked as answer by Anna Cc Saturday, June 28, 2014 10:07 AM
    Wednesday, June 25, 2014 11:16 AM