dotnet/wpf · error · NotImplementedException
ignoring this, since this type will go away soon.
Error message
ignoring this, since this type will go away soon.
What it means
XaslMember.GetXmlNamespaces is an unfinished override that unconditionally throws NotImplementedException with a placeholder message indicating the type itself is slated for removal. Any code path asking a XaslMember for its XML namespaces hits this stub; the library authors never implemented it because the whole Xasl* layer is legacy/deprecated.
Solutions
- Migrate off XaslMember to the standard XamlMember implementation, which supports GetXmlNamespaces — the class is deprecated and will be removed.
- Return a static/empty namespace list from a derived class overriding GetXmlNamespaces if you must keep using XaslMember.
- Catch NotImplementedException around namespace queries and treat the member as having no XML namespaces.
Example fix
// before var ns = xaslMember.GetXmlNamespaces(); // after var ns = xaslMember is XamlMember m ? m.GetXmlNamespaces() : (IList<string>)Array.Empty<string>();
Defensive patterns
Strategy: try-catch
Validate before calling
bool implemented = !(member is XaslMember); // XaslMember.GetXmlNamespaces always throws
Type guard
static bool SupportsXmlNamespaces(XamlMember m) => m is not XaslMember;
Try / catch
try { var ns = member.GetXmlNamespaces(); } catch (NotImplementedException) { var ns = (IList<string>)Array.Empty<string>(); } Prevention
- Do not build new code on the deprecated Xasl* classes; use XamlMember.
- Guard namespace queries when iterating heterogeneous member collections.
- Override GetXmlNamespaces in derived legacy classes if namespace data is needed.
- Track the removal of Xasl types and migrate before the API disappears.
When it happens
Trigger: Calling GetXmlNamespaces() on any XaslMember instance — directly, or via XAML schema processing that queries member namespaces (e.g. writing x:Namespace declarations for a member).
Common situations: Maintaining code that still uses the legacy Xasl (non-'Xaml'-spelled) classes; framework code that enumerates GetXmlNamespaces on all XamlMembers and encounters XaslMember instances; attempted migration of Xasl-based markup to standard System.Xaml tooling.
Related errors
- ' '.' ' is a property without a getter and is not a valid…
- ' '.' ' is a property without a getter and is not a valid…
- ' '.' ' is a property without a getter and is not a valid…
- ' ' is not a valid XAML member name.
- Animation_ChildMustBeKeyFrame
AI-assisted analysis of dotnet/wpf@81131a70a4 (2026-09-14).
Data as JSON: /api/errors/8416131211e61fc3.
Report an issue: GitHub.
Appendix: source
Thrown at src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Xaml/Schema/XaslMember.cs:153
}
[DefaultValue(null)]
new public XamlProperty DependsOn
{
get { return DependsOnCore; }
set { DependsOnCore = value; }
}
[DefaultValue(false)]
new public bool IsAmbient
{
get { return IsAmbientCore; }
set { IsAmbientCore = value; }
}
public override IList<string> GetXmlNamespaces()
{
throw new NotImplementedException("ignoring this, since this type will go away soon.");
}
// ----- Protected Overrides -----
protected override String NameCore
{
get { return _name; }
set { _name = value; }
}
protected override bool IsPublicCore
{
get { return _isPublic; }
set { _isPublic = value; }
}
protected override bool IsBrowsableCore
{
get { return _isBrowsable; }View on GitHub (pinned to 81131a70a4)