How can I map a xmlns and a clr-namespace in .NET 6.0 like XmlnsDefinitionAttribute?

I used System.Windows.Markup.XmlnsDefinitionAttribute in .NET Framework 4.7.2 before and I cannot find the corresponding type in .NET 6.0.

MSDN – XmlnsDefinitionAttribute says that it is not supported in .NET 6.0.

How can I map a XAML namespace to a clr-namespace in .NET 6.0?

>Solution :

WPF was part of the monolithic .NET Framework. Since .NET Core it was split up into separate runtimes, see downloads for an overview. Since then there is a core runtime that does not include WPF and a Destop Runtime that does (there is a separate ASP.NET Runtime as well). In the documentation, when you read Windows Desktop, the .NET Desktop Runtime is meant, so yes, the attribute is included in .NET 6 according to the documentation.

enter image description here

Leave a Reply