Johan Björnfot
Dec 4, 2017
(7 votes)

EPiServer.ServiceLocation.StructureMap 2

We have now released version 2 of EPiServer.ServiceLocation.StructureMap. This version has a dependency against version 4.5.2 of the unsigned version of StructureMap. According to release notes in StructureMap documentation the newer version contains (among other things) performance improvments. 

There are some nuget issues that could be good to know about when updating EPiServer.ServiceLocation.StructureMap. Nuget will not remove references to the packages  structuremap-signed and structuremap.web-signed used by version 1 of EPiServer.ServiceLocation.StructureMap during update. So a recommendation after updating is to uninstall those packages. Also any existing binding redirects to the signed version of StructureMap assembly will remain in web.config.

An alternative to update package is to first uninstall package EPiServer.ServiceLocation.StructureMap, make sure to select option "Remove dependencies". If you have an dependency to package EPiServer.CMS you must also select option "Force uninstall". Then install version 2 of package EPiServer.ServiceLocation.StructureMap. Even in this case there might be old binding redirects left in web.config.

The package has been tested with CMS and we are currently testing it with other products such as Commerce and Find, to make sure it is compatible with other products as well.

Dec 04, 2017


Henrik Fransas
Henrik Fransas Dec 4, 2017 12:22 PM

Thanks for the info Johan!!

Johan Book
Johan Book Dec 12, 2017 09:09 AM

When is it safe to use this with Commerce?

Johan Book
Johan Book Jan 10, 2018 11:18 AM

Gotcha: If you uninstall the old structuremap packages after EPiServer.ServiceLocation.StructureMap you need to reinstall Structuremap 4.5.2 after that. So a recommendation is to uninstall the old structuremap packages before updating Episerver.

Per Jungnelius
Per Jungnelius Jan 30, 2018 11:28 AM

This is currently not compatible with ImageVault. ImageVault.Client 5.7.1 has a dependency via ImageVault.Common.Lib.StructureMap to the structuremap-signed package. So in order to run ImageVault.Client 5.7.1 you need to stay on EPiServer.ServiceLocation.StructureMap 1.

Johan Book
Johan Book Jan 3, 2020 11:35 PM

It seems someone didn't read these instructions before doing Foundation... Both structuremap.web-signed and structuremap-signed is still referenced in

Please login to comment.
Latest blogs
Official List property support

Introduction Until now users were able to store list properties in three ways: Store simple types (int, string, DateTime, double) as native...

Bartosz Sekula | Mar 28, 2023

New dashboard implemented in CMS UI 12.18.0

As part of the CMS UI 12.18.0 release , a new dashboard has been added as a ‘one stop shop’ to enable editors to access all of their content items,...

Matthew Slim | Mar 28, 2023

How to Merge Anonymous Carts When a Customer Logs In with Optimizely Commerce 14

In e-commerce, it is common for users to browse a site anonymously, adding items to their cart without creating an account. Later, when the user...

Francisco Quintanilla | Mar 27, 2023

How to Write an xUnit Test to Verify Unique Content Type Guids in Content Management

When developing an Optimizely CMS solution, it is important to ensure that each content type has a unique GUID. If two or more content types share...

Minesh Shah (Netcel) | Mar 27, 2023