I blogged about
Microsoft.Web.Administration a long while ago, but intentionally I left a small topic aside. However, it remains a misery sometimes painful to developers, so here comes a dedicated post.
Version 126.96.36.199 in Global Assembly Cache
If you plan to write a .NET Framework application to consume
Microsoft.Web.Administration API, you probably notice that Visual Studio resolves that reference to an assembly in GAC,
Figure 1: Microsoft.Web.Administration in full IIS.
This 188.8.131.52 version appears in GAC, as long as you enable full IIS on this Windows machine.
Version 184.108.40.206 in Global Assembly Cache
The 220.127.116.11 version worked pretty fine for years, but suddenly things started to break. For example, if you don’t force the reference in your project file to this specific version
18.104.22.168, you might find that Visual Studio/MSBuild resolves a version of
22.214.171.124 from GAC instead.
Where does this version come from?
Well, it is part of IIS Express installation.
Does it bring any harm?
This assembly by default reads/writes the IIS Express configuration file, so your code suddenly behaves differently (not against full IIS any more).
Since you probably don’t want to uninstall IIS Express (you might need it some day), the remaining option at compile time to resolve the issues is to force your application to use version
126.96.36.199 as reference explicitly.
And then use assembly redirection in
web.config) to load only version
188.8.131.52 at runtime.
But if your web app is being hosted on IIS Express, you might need further changes to IIS Express specific