views:

327

answers:

1

A precompiled ASP.NET 2.0 (Visual Studio 2005) application is throwing this error when we try to access it.

Compiler Error Message: BC2017: could not find library 'C:\WINDOWS\assembly\GAC_MSIL\System.Web.Mobile\2.0.0.0__b03f5f7f11d50a3a\System.Web.Mobile.dll'

Two immediate problems spring to mind:

  1. We're running .NET version 2.0.50727, not 2.0.0.0
  2. Our GAC is located at "C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files," not "C:\WINDOWS\assembly\GAC_MSIL\"

So obviously it's looking for an outdated version of the assembly and it's looking for it in the wrong place.

Unfortunately, we can't recompile the application because we're hosting it for a client and the source code can't be obtained from the original developer. Is there any way to force the ASP.NET application to use the current version of System.Web.Mobile.dll and whatever other standard .NET assemblies it needs?

We will of course lecture them the perils of paying developers and not getting the source code, but we'd sure like to help them get this thing running until they can replace it.

Edit: It turns out that the problem was due to some disk corruption that affected the GAC. Now we're having some other .NET problems related to rebuilding the GAC, but that's another story. Closing this question.

+2  A: 

If you put the DLL's it's looking for in the same folder as the application itself, it should look there first before falling back to the versions in the GAC

EDIT: Just discovered http://www.dll-files.com/. You can check to see id they have the correct version of your DLL

Ian Jacobs
Would I have to put all the ASP.Net standard DLLs (like System.Mobile.Web) in the app folder too? Would I be able to put the 2.0.50727 versions in that folder, since I seem to have no way of obtaining the 2.0.0.0 versions?
John Booty
Without the specific version it's looking for, I'm pretty sure it won't work. I ran into a similar problem deploying an app with Office Interop. I needed to include the proper versions of the DLL's so that the app could run on machines that don't have Office 2007 installed.
Ian Jacobs