Ask a questionAsk a question
 

AnswerDisabling elements in pkgundef seems to have no effect!

  • Friday, October 30, 2009 11:40 AMHenry2323 Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    Hi all,

    it seems so easy but it isn't. You can read everywhere how to disable elements in an Isolated Shell. For example here: http://blogs.msdn.com/vsxue/archive/2007/12/07/preview-walkthrough-a-basic-isolated-shell-application.aspx
    In the section "Removing Features from the Isolated Shell" is explained how to disable the XML editor. So when you create a new Isolated Shell project, uncomment the existing line // [$RootKey$\Packages\{87569308-4813-40a0-9cd0-d7a30838ca3f}] and build the solution then the editor will be still available. So what goes wrong?
    Any suggestions?

    And another question: How can I tell the shell that all registry entries should be removed?
    I found this should be done by the argument /remove but this command is not known any more.

    Thanks for help!
    •  

Answers

  • Sunday, November 01, 2009 5:35 PMSaurabh Jain VSMSFT, OwnerUsers MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     Answer
     There is one issue with the default file. There are comments on the same line.

    [$RootKey$\Packages\{87569308-4813-40a0-9cd0-d7a30838ca3f}] // Visual Studio XML Editor Package

    Please remove the comment from this line and it should allow you to hide the xml editor.

     We will fix the default file in RTM so that this comment is not on the same file.

    --
    Regards,
    Saurabh

    http://blogs.msdn.com/saurabhjain

All Replies

  • Friday, October 30, 2009 12:53 PMHenry2323 Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     Has Code
    Ok, now I found out that the existing pkgundef file of the shell has something in it which causes that other settings fail.
    When the file only consits of theses two lines then the solution explorer and class view are invisible. But the solution explorer can be reactivated using the view menu but this is not true for the class view. When a click on the view menu for the class view is performed then nothing happens. And that is what I expected. So why I can reactivate the solution explorer?

    Here is the existing file when you create a new shell project with VS2010 Beta 2. Some lines are uncommented unter the package section.

    Maybe someone can tell me the problem with the file.
    //This file is where you will place registry entries that are to be removed during setup of your application.
    
    // Hide other language node.
    [$RootKey$\NewProjectTemplates\PseudoFolders\{152CDB9D-B85A-4513-A171-245CE5C61FCC}]
    
    // Hide other project types node.
    [$RootKey$\NewProjectTemplates\PseudoFolders\{DCF2A94A-45B0-11D1-ADBF-00C04FB6BE4C}]
    
    [$RootKey$\NewProjectTemplates\TemplateDirs\{019971D6-4685-11D2-B48A-0000F87572EB}]
    
    [$RootKey$\NewProjectTemplates\TemplateDirs\{39c9c826-8ef8-4079-8c95-428f5b1c323f}]
    
    [$RootKey$\NewProjectTemplates\TemplateDirs\{BEB01DDF-9D2B-435B-A9E7-76557E2B6B52}]
    
    // Leave the blank solution project
    // [$RootKey$\NewProjectTemplates\TemplateDirs\{DA9FB551-C724-11d0-AE1F-00A0C90FFFC3}]
    
    [$RootKey$\Projects\{059D6162-CD51-11D0-AE1F-00A0C90FFFC3}]
    
    [$RootKey$\Projects\{1d6d3185-e7ba-44a5-8dbe-00485ef28094}]
    
    [$RootKey$\Projects\{349C5851-65DF-11DA-9384-00065B846F21}]
    
    [$RootKey$\Projects\{349C5853-65Df-11DA-9384-00065B846F21}]
    
    [$RootKey$\Projects\{349C5854-65Df-11DA-9384-00065B846F21}]
    
    [$RootKey$\Projects\{5600DBA8-E3D8-42CB-B290-4CFFE16ACD2D}]
    
    [$RootKey$\Projects\{58839851-977a-4c1b-a0d3-79157d5f2bbf}]
    
    [$RootKey$\Projects\{60dc8134-eba5-43b8-bcc9-bb4bc16c2548}]
    
    [$RootKey$\Projects\{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}]
    
    [$RootKey$\Projects\{911E67C6-3D85-4fce-B560-20A9C3E3FF48}]
    
    // Hide web items.
    [$RootKey$\Projects\{A2FE74E1-B743-11d0-AE1A-00A0C90FFFC3}\AddItemTemplates\TemplateDirs\{F5E7E720-1401-11d1-883B-0000F87579D2}]
    
    // Hide script items.
    [$RootKey$\Projects\{A2FE74E1-B743-11d0-AE1A-00A0C90FFFC3}\AddItemTemplates\TemplateDirs\{39c9c826-8ef8-4079-8c95-428f5b1c323f}]
    
    [$RootKey$\Projects\{B11A6AD6-2D76-4C13-BDD7-78ED7004C364}]
    
    [$RootKey$\Projects\{D1DCDB85-C5E8-11D2-BFCA-00C04F990235}]
    
    [$RootKey$\Projects\{E24C65DC-7377-472b-9ABA-BC803B73C61A}]
    
    [$RootKey$\Projects\{E502E3C0-BAAE-11D0-88BF-00A0C9110049}]
    
    [$RootKey$\Projects\{E6FDF86B-F3D1-11D4-8576-0002A516ECE8}]
    
    [$RootKey$\Projects\{F184B08F-C81C-45F6-A57F-5ABD9991F28F}]
    
    [$RootKey$\Projects\{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}]
    
    // The following lists the default packages that are included in the Visual Studio Isolated Shell.
    // By uncommenting the package key in this file, the package will not load when the Isolated Shell is launched.
    
    // General Packages
    [$RootKey$\Packages\{0B680757-2C29-4531-80FA-535A5178AA98}] // Visual Studio Code Snippets Package
    [$RootKey$\Packages\{0E13FC54-9231-410b-8B74-95689CD32627}] // Start Page
    [$RootKey$\Packages\{20aaf8fa-14c0-4897-8ca0-4d861e2b1212}] // XML Schema Designer
    [$RootKey$\Packages\{21af45b0-ffa5-11d0-b63f-00a0c922e851}] // Class Outline Package
    // [$RootKey$\Packages\{2c298b35-07da-45f1-96a3-be55d91c8d7a}] // Toolbox Control Installer Package
    // [$RootKey$\Packages\{36839529-3AF3-47fa-8194-F4A3FA9F0ED7}] // ToolBox Control Installer Package
    // [$RootKey$\Packages\{4A791146-19E4-11D3-B86B-00C04F79F802}] // Visual Studio Help Package
    // [$RootKey$\Packages\{4A9B7E50-AA16-11d0-A8C5-00A0C921A4D2}] // Visual Studio Task List Package
    // [$RootKey$\Packages\{5010C52F-44AB-4051-8CE1-D36C20D989B4}] // Visual Studio Directory Listing Package
    // [$RootKey$\Packages\{588205e0-66e0-11d3-8600-00c04f6123b3}] // Visual Studio Component Enumerator Package
    [$RootKey$\Packages\{5B98C2C0-CD7B-11D0-92DF-00A0C9138C45}] // Visual Studio Binary Editor Package
    // [$RootKey$\Packages\{5CB51D20-CA1E-4b7e-94D9-CC3E77198E7A}] // Visual Studio Quick Search Package
    // [$RootKey$\Packages\{67909B06-91E9-4F3E-AB50-495046BE9A9A}] // Visual Studio Settings and Project Designers Package
    // [$RootKey$\Packages\{74AAD8B2-3294-49CB-BB5D-E9BAB132BFD5}] // Visual C++ Resource Editor Package
    // [$RootKey$\Packages\{7eab3c71-59ff-4571-a5f3-643f255fc2e6}] // ElementHost Designer Package
    [$RootKey$\Packages\{87569308-4813-40a0-9cd0-d7a30838ca3f}] // Visual Studio XML Editor Package
    // [$RootKey$\Packages\{8D8529D3-625D-4496-8354-3DAD630ECC1B}] // Visual Studio Explorers and Designers Package
    // [$RootKey$\Packages\{8ff5c2a8-5eba-4717-8ee1-46b6427d8ff3}] // MRU Data Source
    [$RootKey$\Packages\{e8b06f41-6d01-11d2-aa7d-00c04f990343}] // Visual Studio Web Browser Package
    [$RootKey$\Packages\{f1e4cfca-4573-4345-8718-7bde2b1f0be8}] // Export Template Package
    // [$RootKey$\Packages\{F5E7E720-1401-11d1-883B-0000F87579D2}] // Text Management Package
    [$RootKey$\Packages\{afa50ba6-e144-43c7-8cc2-2244793ef4e9}] // Microsoft.VsWizards.ImportProjectFolderWizard.NewProjectFromExistingPackage
    
    // Debugger Related Packages
    [$RootKey$\Packages\{BEB01DDF-9D2B-435B-A9E7-76557E2B6B52}] // Visual Studio Debugger Managed Package
    [$RootKey$\Packages\{C9DD4A57-47FB-11D2-83E7-00C04F9902C1}] // Visual Studio Debugger
    [$RootKey$\Packages\{D277DC8A-AA1E-4303-8C03-1C58DB18E98B}] // Microsoft.VisualStudio.Debugger.PdtDebug
    
    // Data Related Packages
    [$RootKey$\Packages\{220A4C17-7E7C-4663-BBCC-5E607C6543CD}] // Visual Database Tools Package
    [$RootKey$\Packages\{A8F602E2-40CE-4daf-AE82-A457A91728B9}] // Visual Studio Data Designer Extensibility Package
    [$RootKey$\Packages\{b65e9356-a4c7-4855-96bb-1d3ec8514e8f}] // Microsoft.VisualStudio.Data.Providers.SqlEverywhere.VsPackage
    [$RootKey$\Packages\{d6c919aa-1217-41e2-a13b-9b92e1866305}] // Visual Studio Data Designers
    [$RootKey$\Packages\{E1AA7737-69BE-43d0-A425-E3097651E192}] // Visual Studio Data Package
    [$RootKey$\Packages\{EF828E39-70F5-4b8e-A3A0-4C0ECD28A69A}] // Visual Studio Database Tools Designers
    [$RootKey$\Packages\{F3A96850-E2AE-4e00-9278-8FE23F225A0D}] // Microsoft Report Designer
    
    // Web Specific Packages
    [$RootKey$\Packages\{1B437D20-F8FE-11D2-A6AE-00104BCC7269}] // Visual Studio HTM Editor Package
    [$RootKey$\Packages\{349C5850-65DF-11DA-9384-00065B846F21}] // Microsoft.VisualStudio.Web.Application.WAPackage
    [$RootKey$\Packages\{39c9c826-8ef8-4079-8c95-428f5b1c323f}] // Visual Web Developer Project System Package
    [$RootKey$\Packages\{8FF02D1A-C177-4ac8-A62F-88FC6EA65F57}] // Visual Web Developer Project Persistance Package
    [$RootKey$\Packages\{A764E895-518D-11d2-9A89-00C04F79EFC3}] // Visual Studio CSS Editing Package
    [$RootKey$\Packages\{BFCC0C3C-6F87-4285-A6C8-BB616061800D}] // Visual Web Developer HTML Source Editor Package
    [$RootKey$\Packages\{DC7F691A-91FC-4F7b-923E-FE829C3A18DC}] // Visual Web Developer Web Application Upgrade Package
    [$RootKey$\Packages\{e7f851c8-6267-4794-b0fe-7bcab6dacbb4}] // Visual Web Developer Web Package
    
    // Source Control Packages
    [$RootKey$\Packages\{53544C4D-B03D-4209-A7D0-D9DD13A4019B}] // Visual SourceSafe Provider Stub Package
    [$RootKey$\Packages\{53544C4D-E3F8-4AA0-8195-8A8D16019423}] // Visual Studio Source Control Integration Package
    [$RootKey$\Packages\{AA8EB8CD-7A51-11D0-92C3-00A0C9138C45}] // Visual SourceSafe Provider Package
    
    // Domain Specific Language Packages
    [$RootKey$\Packages\{a9696de6-e209-414d-bbec-a0506fb0e924}] // Microsoft DSL Tools
    [$RootKey$\Packages\{B7C8A95B-B8E4-4adb-9560-0F487D1429FB}] // Microsoft.VisualStudio.Modeling.Integration.Shell.ModelBusPackage
    [$RootKey$\Packages\{c8afb2f4-bff7-4055-926d-d44afecd5832}] // Microsoft.VisualStudio.DataDesign.SyncDesigner.DSL.SyncDesignerPackage
    [$RootKey$\Packages\{d1091694-ea72-4bdd-8918-78324cc25448}] // Microsoft.VisualStudio.Modeling.Shell.CommonModelingPackage (Microsoft DSL Tools)
    
    // ToolWindows
    [$RootKey$\ToolWindows\{3AE79031-E1BC-11D0-8F78-00A0C9110057}] // Solution Explorer
    

  • Sunday, November 01, 2009 5:35 PMSaurabh Jain VSMSFT, OwnerUsers MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     Answer
     There is one issue with the default file. There are comments on the same line.

    [$RootKey$\Packages\{87569308-4813-40a0-9cd0-d7a30838ca3f}] // Visual Studio XML Editor Package

    Please remove the comment from this line and it should allow you to hide the xml editor.

     We will fix the default file in RTM so that this comment is not on the same file.

    --
    Regards,
    Saurabh

    http://blogs.msdn.com/saurabhjain
  • Monday, November 02, 2009 2:47 PMSalec Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    Rather than move the comments to another file.  Can you PLEASE just fix the parsing of the pkgundef file to support line comments properly?  It's extremely convenient to have the comments on the same line in the very format given and it's also terribly unintuitive that this sort of thing is not allowed and will silently break your pkgundef file!

    If you won't change the parsing format at least change the comment token.  Using "//" leads many of us to believe that the same rules that apply to other popular languages that use the same token (C++, C#) which they clearly do not.  As well as please add error reporting or something to let us know when some sort of error has occurred in the pkgundef file as this was terribly difficult to debug (in my other thread about the same issue, the comment was removed from one line, but not the line above it).

    -Shaun
  • Tuesday, November 03, 2009 8:21 AMNathan Halstead [MSFT]ModeratorUsers MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    Hi Shaun,

    Thank you for reporting this bug.  As Saurabh notes, this bug has been fixed for our next release of Visual Studio.  The current workaround is to move the comment to its own line in the file. 

    We do have diagnostics you can use to gather some basic information about issues that occur during the loading of your application.  If you launch your application with the "/log" switch, an event log will be generated and placed under %RoamingAppData%\Microsoft\AppEnv\10.0\ActivityLog.xml (Close your application for the complete log).  While there are some gaps in these diagnostics, they can be quite helpful when trying to diagnose or at least pinpoint issues that occur while your application runs.

    Thanks again,
    Nathan