Skip to content

Need to support the ability to override "generators" #2602

Description

@davkean

To speed up code generation when switching tabs in the XAML designer, the XAML "overrides" the MSBuild::Compile generator and replaces it with the XAML single file generator. We need to make official support for this, especially as build is out-of-proc and XAML won't be able to register a host object to get unsaved changes.

See CLangFileNode::GetXamlOverrideGenerator for more information.

Activity

  1. added
    Parity-Legacy-Feature
    Needs-CPS-work
    Feature-XAML
    on Jul 13, 2017
  2. added this to the milestone on Jul 24, 2017
  3. modified the milestones: 15.7, on Mar 30, 2018
  4. davkean commented on May 28, 2018

    @davkean
    MemberAuthor

    The way this works is like follows:

    • This adds a new string value called; OverrideGenerator that is added to extension section of a generator that represents the ProgId of the override generator.
    • Based on its extension a file is considered as using this OverrideGenerator if it's generator matches the default generator. For example, in the following, XAML files marked with MSBuild::Compile are considered as using the XamlIntelliSenseFileGenerator single file generator.

    image

    • When queried, CustomTool for a file/project item returns the overridden generator - but does not ever write that generator out if hasn't changed.

    The last one suspects that we might need to write a custom data source for the CustomTool property instead of just swapping at the point we go to create it.

  5. modified the milestones: Unknown, 16.0 on Jun 8, 2018
  6. modified the milestones: 16.0, 16.1 on Dec 18, 2018
  7. davidwengier commented on Mar 25, 2019

    @davidwengier
    Member

    This works now, via CPS in src\Microsoft.VisualStudio.ProjectSystem.VS.Implementation\CodeGenerators\WpfCodeGeneratorOverriderProvider.cs but probably needs to move to VsGeneratorsCacheService and be read from the registry

  8. modified the milestones: 16.1, Backlog on Mar 26, 2019
  9. added
    Triage-Approved
    on Mar 30, 2020
  10. removed their assignment
    on Oct 18, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Feature-XAMLNeeds-CPS-workParity-Legacy-FeatureTriage-Approved

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions