Class ViewLocatorNotFoundException
- Namespace
- ReactiveUI
- Assembly
- ReactiveUI.dll
An exception that is thrown if ReactiveUI fails to locate an IView
- Inheritance
-
View
Locator Not Found Exception
- Implements
- Inherited Members
- Extension Methods
Examples
try
{
var view = ViewLocator.Current.ResolveView(viewModel);
}
catch (ViewLocatorNotFoundException ex)
{
logger.LogCritical(ex, "ReactiveUI was not initialized; cannot resolve views.");
}
Remarks
This exception typically indicates that the application's dependency resolver has not been initialized via
UseReactiveUI, services.AddReactiveUI(), or custom DI registration. It can also surface when assemblies
containing the default locator are trimmed out of the app package. Catch the exception at startup to log
configuration issues and ensure the container registers an IView
Constructors
ViewLocatorNotFoundException()
Initializes a new instance of the View
ViewLocatorNotFoundException(string)
Initializes a new instance of the View
Parameters
messagestringA user friendly message.
ViewLocatorNotFoundException(string, Exception)
Initializes a new instance of the View