ValueFactory attempted to access the Value property of this instance
See original GitHub issue.NET 5.0 | Prism.Wpf 8.0.0.1909
While overriding the CreateContainerExtension()
method in App.xaml.cs
, I get the following error
ValueFactory attempted to access the Value property of this instance.
Code:
protected override IContainerExtension CreateContainerExtension()
{
return ContainerLocator.Current;
}
Trace:
System.InvalidOperationException
HResult=0x80131509
Message=ValueFactory attempted to access the Value property of this instance.
Source=System.Private.CoreLib
StackTrace:
at System.Lazy`1.ViaFactory(LazyThreadSafetyMode mode)
at System.Lazy`1.ExecutionAndPublication(LazyHelper executionAndPublication, Boolean useDefaultConstructor)
at System.Lazy`1.CreateValue()
at System.Lazy`1.get_Value()
at Prism.Ioc.ContainerLocator.get_Current()
at System.Lazy`1.ViaFactory(LazyThreadSafetyMode mode)
This exception was originally thrown at this call stack:
[External Code]
Fss.Searcher.App.CreateContainerExtension() in App.xaml.cs
[External Code]
Issue Analytics
- State:
- Created 3 years ago
- Reactions:3
- Comments:14 (1 by maintainers)
Top Results From Across the Web
c# - InvalidOperationException in my Lazy<> value factory
ValueFactory attempted to access the Value property of this instance. I don't see anything in my "value factory" method that accesses the Value ......
Read more >ValueFactory attempted to access the Value property of this ...
Hi. Thank you for ASP.NET API Versioning. I get System.InvalidOperationException: ValueFactory attempted to access the Value property of ...
Read more >ValueFactory attempted to access the Value property of this ...
I cannot run the project as the above error is shown. REQUIREMENT : I want to show dyanmic created values in PermissionManagement screen...
Read more >Blazor TypeClient `AddHttpMessageHandler` emits ...
WebAssemblyRenderer[100] Unhandled exception rendering component: ValueFactory attempted to access the Value property of this instance.
Read more >ValueFactory attempted to access the Value property of this
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can...
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
Details:
You should be calling PrismContainerExtension.Init()