You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Need to support the ability to override "generators" #2602
Feature-XAMLFeatures related to the XAML designer and display and manipulation of XAML files.Needs-CPS-workChanges are needed in the closed-source Common Project System (CPS) repo.Parity-Legacy-FeatureMissing features from the legacy project system.Triage-ApprovedReviewed and prioritized
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.
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.
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.
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
Feature-XAMLFeatures related to the XAML designer and display and manipulation of XAML files.Needs-CPS-workChanges are needed in the closed-source Common Project System (CPS) repo.Parity-Legacy-FeatureMissing features from the legacy project system.Triage-ApprovedReviewed and prioritized
Activity
davkean commentedon May 28, 2018
The way this works is like follows:
OverrideGeneratorthat is added to extension section of a generator that represents the ProgId of the override generator.OverrideGeneratorif 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.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.
davidwengier commentedon Mar 25, 2019
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