Autofac.Extras.CommonServiceLocator doesn't work with Autofac 4.3.0+
See original GitHub issueHi, Team.
Wonder if this is a known issue or not. I’m using Autofac.Extras.CommonServiceLocator 4.0.0 at my project. If I upgrade the Autofac version higher than 4.2.1, it throws an exception (xxxx
masking intended):
Exception while executing function: xxxx. mscorlib: Exception has been thrown by the target of an invocation. xxxx: The type initializer for 'xxxx' threw an exception. xxxx: Method not found: 'Void Autofac.Extras.CommonServiceLocator.AutofacServiceLocator..ctor(Autofac.IComponentContext)'.
I tried 4.3.0, 4.4.0, 4.5.0 and 4.6.0 but all threw the same exception. Therefore I have to stay on 4.2.1 until this is fixed. Could you please let me know a workaround? I suspect that Autofac.Extras.CommonServiceLocator hasn’t been updated for about a year, which resulted in failing to support .NET Standard.
Cheers,
Issue Analytics
- State:
- Created 6 years ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
Aliencube.Autofac.Extras.CommonServiceLocator 4.0.1
The Microsoft Enterprise Library provides a Common Service Locator for abstracting away IoC containers. .NET Standard port of this package ...
Read more >Autofac.Extras.CommonServiceLocator 6.1.0
CommonServiceLocator. Common Service Locator implementation for Autofac. Build status. Please file issues and pull requests for this package in this repository ...
Read more >Common Service Locator — Autofac 7.0.0 documentation
Extras.CommonServiceLocator package allows you to use Autofac as the backing store for services in places where you require Microsoft Common Service Locator ......
Read more >nuget packages requiring net6.0 are "not compatible with ...
After booting up my PC I tried to continue using a previous project I had been working on: ASP.NET MVC Core 6.0. All...
Read more >Package Manager Console的使用- osc_f8mjcido的个人空间
Autofac {4.9.0} Autofac is an IoC container for Microsoft .NET. It manages the dependencies between classes so that applications stay easy to... Autofac.Extras....
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 Free
Top 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
Unfortunately I don’t really have time to offer deep individualized help like that. Without even looking, though, I can tell you the replacement will be one of these:
You’ll have to choose the best option for you.
You might also see if you can submit a PR to CSL but if they’re not maintaining it anymore that may be hard.
Oh, yeah, sorry for confusion. On mobile over the long holiday weekend here in the US. When I was asking for a repro I meant “a small, very simple reproduction showing a project where NuGet allowed you to somehow add the packages in the unsupported configuration” rather than “link to a repo full of projects to navigate through.” Apologies for the confusion, but glad I could help. Good luck!