Sunday, 20 October 2019

Helix Publishing Pipeline - file locks issue on deploy

On my last project when I was implementing Helix Publishing Pipeline I found really bizarre issue. Almost every time I was deploying code by publishing it from Visual Studio, some dlls were locked by w3wp process.

No surprise IIS uses those assemblies but I didn't have such locking problem earlier.

I was digging for hours in the Internet and I found out that IIS uses assembly shadowing. So basically it doesn't use directly dlls from webroot bin, but from its the temp folder.

It can be disabled by this setting

<hostingEnvironment shadowCopyBinAssemblies="false" />

When I set this for test, file locks were all over the place.

Earlier I used Process Explorer and I saw that w3wp locks not only shadowed dlls but as well those from webroot bin, so something was not right there!

More digging eventually gave me information that our issue was self-inflicted:

In GlassMapperScCustom assemblies were loaded by invoking method

which loads exact assemblies and it doesn't take into account shadows.

Instead of that we should always use


which loads shadows as it should be.

That fixed issue with file locks for good!

Share it:

Radosław Kozłowski - Senior Sitecore Developer Radoslaw Kozlowski

Author & Editor

Sitecore MVP, passionate Sitecore & .NET developer and architect. Sitecore Community evangelist.


  1. Chamber locks for the most part utilize this kind of lock component however it could likewise be available in cylindrical pin tumbler locks or outspread locks.

  2. Supplanting and fixing locksmith Scarborough start locks on numerous models.

  3. Proficient business locksmith administrations exist decisively to evaluate the necessities of a wide range of organizations and address the issues of each with an altered arrangement. emergency Toronto locksmith

  4. Taking everything into account, locks snapping is an issue in the UK, however just in the event that you have an euro-style lock.