Skip to content


Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?


Failed to load latest commit information.

StructureMap has been sunsetted

See instead the newer Lamar library as a replacement for StructureMap in new applications. I will continue to accept pull requests and try to answer questions, but there will be no new development on StructureMap unless someone else takes over project ownership.

-- Jeremy

Welcome to StructureMap, the oldest Inversion of Control container for .Net.

Getting StructureMap

Join the chat at

StructureMap is available via NuGet:

Install-Package StructureMap

Or alternatively via the .NET Core CLI:

dotnet add package structuremap

If you want to fix a bug or just want to tinker with an idea, we love receiving pull requests!

Building the Source

As of StructureMap 4.3, the codebase uses the new Dotnet CLI to build and run tests. Paket is no longer used to resolve nuget dependencies.

  1. Clone the repository: git clone git://
  2. (Optional) From the command line, dotnet test src/StructureMap.Testing
  3. Open the solution at src/StructureMap.sln and go to town!


The StructureMap team uses Rake internally and on the CI server, but Rake is no longer necessary in any way for developing with the StructureMap codebase.

Please post any questions or bugs to the StructureMap Users mailing list.

The latest documentation is available at

Thanks for trying StructureMap.

Documentation Authoring

StructureMap uses the StorytellerDocGen tool to author and publish the documentation website.

The documentation is just markdown files in the documentation folder under the root. Code samples can be pulled from anywhere within the StructureMap codebase. The actual web content is published manually to the repository.

To run the documentation website locally, from the command line at the root of the StructureMap repository, either:

  1. rake docs - If you're comfortable with Rake
  2. dotnet restore && dotnet stdocs run - do note that this will default to the version being 1.0, but the correct version will be applied when it's actually published


A Dependency Injection/Inversion of Control tool for .NET








No packages published