Multiple versions of Microsoft.Web.Administration.dll in IIS 10

On some Windows 10 machine with IIS 10 installed I have three Microsoft.Web.Administration.dll:

Two versions 7.0.0.0 and 7.9.0.0 in GAC (C:\Windows\assembly\GAC_MSIL\Microsoft.Web.Administration\) in 7.0.0.0__31bf3856ad364e35 and 7.9.0.0__31bf3856ad364e35 folders respectively and one version 7.0.0.0 in C:\Windows\System32\inetsrv\.

The following XML element in a Visual Studio project file adds a reference to version 7.0.0.0 of Microsoft.Web.Administration.dll:

<Reference Include="Microsoft.Web.Administration, Version=7.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
    <HintPath>%WINDIR%\System32\inetsrv\Microsoft.Web.Administration.dll</HintPath>
    <Private>True</Private>
</Reference>

The same XML element with SpecificVersion=False will automatically reference the highest available version on this machine that is 7.9.0.0.

Probably version 7.9.0.0 of Microsoft.Web.Administration.dll is installed with some Windows 10 update, so an application referencing (and probably having a local copy of) version 7.9.0.0 will not work on a clean Windows 10 installation with no updates installed.

To determine the version of Microsoft.Web.Administration.dll I used the following command in PowerShell (it works only with full path):

[System.Reflection.Assembly]::LoadFrom("C:\temp\Microsoft.Web.Administration.dll").GetName().Version

Leave a Reply

Your email address will not be published.