Could not Find Library System.EnterpriseServices.dll

An old version of Visual Studio, together with a DotNetNuke installation gave a missing library error.

The missing library was System.EnterpriseServices.dll

A more complete error report is given below:

Server Error in '/dnn4.5.1' Application.
Description:  An error occurred during the compilation of a resource required to service this request.
Please review the following specific error details and modify your source code appropriately.

Compiler Error Message: BC2017: could not find library 'C:\WINDOWS\assembly\GAC_32\System.EnterpriseServices\2.0.0.0__b03f5f7f11d50a3a\System.EnterpriseServices.dll'

Source Error:

Source File: vbc : Command line    Line: 0

C:\WINDOWS\system32> "C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\vbc.exe" /t:library /utf8output /R:"C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\dnn4.5.1\510f65ef\fba7a194\assembly..."
...

Version Information: Microsoft .NET Framework Version:2.0.50727.42; ASP.NET Version:2.0.50727.210

Previously errors tended to be resolved by deleting the temporary directory or by ensuring that the correct permissions had been assigned.

Initially I had checked the permissions for the directories mentioned, ensuring that both ASP.NET and Network Service had both read and write access.

Unusually, I found that to resolve this issue I had to re-install the .NET framework.