question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

AvaloniaLocator.Current is no longer accessible

See original GitHub issue

Describe the bug AvaloniaLocator was recently marked with the PrivateApi attribute and thus its no longer accessible from outside of the Avalonia projects.

To Reproduce Steps to reproduce the behavior:

  1. Try to access e.g. AvaloniaLocator.Current.GetRequiredService<IAssetLoader>() for e.g. loading assets dynamically
  2. Observe that it’s no longer possible in 11.0.0 rc1.1 (was still working in 11.0.0 preview 8)

Expected behavior Either make it available again or offer a different way to access services created within Avalonia that are needed in user code.

Desktop (please complete the following information):

  • OS: Windows 11, Linux (Raspberry Pi OS & custom image built with yocto)

Issue Analytics

  • State:closed
  • Created 4 months ago
  • Comments:8 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
timuniecommented, Jul 24, 2023

@timkicker you need to swtich to 11.0 docs, see: image

1reaction
ImparTechnologyCeocommented, Jul 12, 2023

Resolve logo essa palhaçada ai Capturar

Read more comments on GitHub >

github_iconTop Results From Across the Web

Avalonia 11 Porting Guide
The AvaloniaLocator is no longer available. Most services that were available via the locator now have alternative methods of access:.
Read more >
Not all resources loading · Issue #5388 · AvaloniaUI/Avalonia
Describe the bug After including images as AvaloniaResource in a separate assembly, only 13 images and one AvaloniaResourceXamlInfo is ...
Read more >
The View Locator
The View Locator. On this page you will learn how the view locator class that the solution template added to your project is...
Read more >
AvaloniaUI: Dependency Injection
Hello, in this post I gonna explain how to use dependency injection in AvaloniaUI application and why is it so important.
Read more >
Newest 'avalonia' Questions - Stack Overflow
AvaloniaLocator Current does not exists Linux. AvaloniaLocator.Current is not a public property and in the docs that I read they all use it....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found