← All recipes
Moderne licensed

XmlnsDefinitions should map all namespaces with public types

Recipe IDOpenRewrite.Recipes.CSharp.CodeQuality.Wpf.AddXmlnsDefinitionForUnmappedNamespacesArtifactOpenRewrite.Recipes.CSharp.CodeQuality

Adds an [assembly: XmlnsDefinition] for every namespace that declares a public type but is not exported to XAML, copying the XAML namespace URL from the existing mappings.

Single recipecsharpcode-qualityProprietary

Usage

This recipe has no required configuration options. You’ll need the Moderne CLI configured before running the command below.

mod run . --recipe OpenRewrite.Recipes.CSharp.CodeQuality.Wpf.AddXmlnsDefinitionForUnmappedNamespaces

If the recipe isn’t available locally, install it with:

mod config recipes nuget install OpenRewrite.Recipes.CSharp.CodeQuality