Bogus warning when a `TopLevel` does not have a parameterless constructor
See original GitHub issueDescribe the bug
If a TopLevel
control does not have a parameterless constructor (e.g. because dependency injection is being used), the compiler emits this warning:
Avalonia warning AVLN:0005: XAML resource “avares://foo” won’t be reachable via runtime loader, as no public constructor was found
This warning is bogus for a TopLevel
, because as the name suggests it can only be a root element of a XAML file. A compile error regarding this was already fixed in #2593.
According to blame, the warning was introduced as part of #9541.
Expected behavior
No warnings are emitted when a TopLevel
does not have a parameterless constructor.
Issue Analytics
- State:
- Created 4 months ago
- Comments:6 (6 by maintainers)
Top Results From Across the Web
Is there a test data builder that works with classes without ...
Bogus example is var myObject = Faker.Generate<MyClass>(); . However, looks like both Bogus and NBuilder expect my classes to have parameterless ...
Read more >Welcome to C# 10 - .NET Blog
It was an error for you to create a parameterless constructor on a struct. Starting in C# 10, you can include your own...
Read more >cec.miamioh.edu/files/cpplint.py
IN NO EVENT SHALL THE COPYRIGHT # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES...
Read more >Get error is "no parameterless constructor defined for this ...
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information ...
Read more >Breaking changes in 7.0 | Elasticsearch Guide [7.17]
An Elasticsearch 7.0 node will not start in the presence of indices created in a version ... For existing pre-7.0 indices, a deprecation...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Pass
NoWarn
property as a task parameter@kekekeks any examples of this being done or guidleines on where and how to add this?