Skip to content

XmlnsDefinitonAttribute is not supported for "this" assembly #28150

@etvorun

Description

@etvorun

Description

XmlnsDefinitonAttribute's are ignored for "this" assembly

Steps to Reproduce

  1. New MAUI app.
  2. Add MyLabel.cs containing following code
[assembly: XmlnsDefinition("http://consoto.com", "MyApp.Controls")]
namespace MyApp.Controls
{
    public class MyLabel : Label { }
}
  1. Open MainPage.xaml.
  2. Add xmlns:o="http://consoto.com" to root element.
  3. Replace any of <Label ...> with <o:MyLabel ...>.
  4. Build and run.
    Expected: no build errors, app runs fine, MyLabel is created (can see in in Live Visual Tree).
    Actual: "type not found http://consoto.com:MyLabel" build error

Link to public reproduction project repository

No response

Version with bug

9.0.40 SR4

Is this a regression from previous behavior?

Not sure, did not test other versions

Last version that worked well

Unknown/Other

Affected platforms

iOS, Android, Windows, macOS

Affected platform versions

No response

Did you find any workaround?

No response

Relevant log output

Metadata

Metadata

Labels

area-xamlXAML, CSS, Triggers, Behaviorspartner/platform-toolsClient Experiences Platform Toolss/triagedIssue has been revieweds/verifiedVerified / Reproducible Issue ready for Engineering Triaget/bugSomething isn't working

Type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions