gitwtfhub

wtf is autofac.extras.commonservicelocator?

autofac/autofac.extras.commonservicelocator — explained in plain English

Analysis updated 2026-07-27 · repo last pushed 2026-07-09

7C#Audience · developerComplexity · 2/5ActiveSetup · easy

TL;DR

A small bridge that lets Autofac, a .NET dependency injection tool, work with the Common Service Locator shared interface so third-party libraries can request services without knowing about Autofac specifically.

Mindmap

mindmap
  root((repo))
    What it does
      Bridges Autofac and CSL
      Translates between tools
      Enables third-party libraries
    Tech stack
      C-sharp dotnet
      Autofac container
      Common Service Locator
    Use cases
      Mix Autofac with CSL libraries
      Support frameworks expecting CSL
      Share services across libraries
    Audience
      NET developers
      Autofac users
      Integration builders
    Setup
      Configure Autofac normally
      Register AutofacServiceLocator
      Simple activation

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

Why would anyone build with this?

REASON 1

Connect Autofac-managed services to third-party libraries that rely on the Common Service Locator interface.

REASON 2

Use frameworks that expect a Common Service Locator while keeping Autofac as your dependency injection container.

REASON 3

Share application components across different libraries through a common service-lookup interface.

What's in the stack?

C#.NETAutofacCommon Service Locator

How it stacks up

autofac/autofac.extras.commonservicelocatord2phap/happlaboxdrwuu/playsmart-unity-uitoolkit-extensions
Stars777
LanguageC#C#C#
Last pushed2026-07-092023-03-14
MaintenanceActiveDormant
Setup difficultyeasyeasyeasy
Complexity2/52/52/5
Audiencedevelopergeneraldeveloper

Figures from each repo's GitHub metadata at analysis time.

How do you spin it up?

Difficulty · easy Time to first run · 5min

Requires Autofac and the Common Service Locator NuGet packages, but no external infrastructure or API keys needed.

The README does not mention a license, check the repository or source files for licensing details.

Wtf does this do

This project is a small bridge that connects two tools used in .NET applications: Autofac and the Common Service Locator. Autofac is a popular "dependency injection" container, which is a way for applications to automatically provide the right pieces of code to the right places without hardwiring everything together. The Common Service Locator is a shared interface that lets different libraries ask for pieces of code in a consistent way, regardless of which specific container is running in the background. This package makes Autofac work with that shared interface. Without a tool like this, you can run into a problem when building larger applications. Say you are using Autofac to manage your app's components, and you bring in a third-party library that also needs to fetch services at runtime. That library might not know about Autofac specifically, but if it knows about the Common Service Locator, it can ask for what it needs through that shared interface. This package translates between Autofac and the Common Service Locator so they can talk to each other. The setup is straightforward. You configure Autofac as you normally would, then create an instance of the AutofacServiceLocator class and register it as the active service locator. From that point on, any code that asks the Common Service Locator for a service will get it through Autofac behind the scenes. This is mainly for developers building .NET applications who are already using Autofac and need to work with libraries or frameworks that expect a Common Service Locator. It is a niche integration package rather than a standalone tool, which explains its modest community footprint. The README does not go into deeper detail about advanced scenarios or tradeoffs, pointing instead to the broader Autofac documentation for those topics.

Yoink these prompts

Prompt 1
I have a .NET app using Autofac for dependency injection, and a third-party library expects Common Service Locator. Show me how to wire up AutofacServiceLocator so the library can resolve services through Autofac.
Prompt 2
Write a C# example that configures Autofac, creates an AutofacServiceLocator instance, and registers it as the active Common Service Locator, then resolves a sample service.
Prompt 3
Help me understand when I need this Autofac Extras Common Service Locator package versus just using Autofac directly in my .NET project.

Frequently asked questions

wtf is autofac.extras.commonservicelocator?

A small bridge that lets Autofac, a .NET dependency injection tool, work with the Common Service Locator shared interface so third-party libraries can request services without knowing about Autofac specifically.

What language is autofac.extras.commonservicelocator written in?

Mainly C#. The stack also includes C#, .NET, Autofac.

Is autofac.extras.commonservicelocator actively maintained?

Active — commit in last 30 days (last push 2026-07-09).

What license does autofac.extras.commonservicelocator use?

The README does not mention a license, check the repository or source files for licensing details.

How hard is autofac.extras.commonservicelocator to set up?

Setup difficulty is rated easy, with roughly 5min to a first successful run.

Who is autofac.extras.commonservicelocator for?

Mainly developer.

View the repo → Decode another repo

This repo across BitVibe Labs

Don't trust strangers blindly. Verify against the repo.