Help with Assembly Binding in ASP.NET 2.0 Web Application Projects

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



I have been directed by my team lead to remove a dll I am responsible for
from the bin directory of our ASP.NET 2.0 web application by changing the
CopyLocal property to False. I have done this and am getting the following
error:

Could not load file or assembly 'GrangeAJAXComponents' or one of its
dependencies. The system cannot find the file specified.

I have installed GrangeAJAXComponents.dll into the GAC and verified its
version and public key. I have opened the project file in Notepad and
verified that the version number and public key match what is displayed in
the GAC:

<Reference Include="GrangeAJAXComponents, Version=1.0.0.0,
Culture=neutral, PublicKeyToken=82f335bc3105596d, processorArchitecture=MSIL">

<HintPath>C:\Blocks\GrangeAJAXComponents\GrangeAJAXComponents.dll</HintPath>
</Reference>

The Assembly Binging Log from Fusion shows the following:

The operation failed.
Bind result: hr = 0x80070002. The system cannot find the file specified.
<snip>
LOG: DisplayName = GrangeAJAXComponents
(Partial)
<snip>
LOG: Policy not being applied to reference at this time (private, custom,
partial, or location-based assembly bind).
<snip>
LOG: All probing URLs attempted and failed.

By contrast, another dll which is referenced in precisely the same way has
the following log:

The operation was successful.
Bind result: hr = 0x0. The operation completed successfully.
<snip>
LOG: DisplayName = WebCustomValidationControls, Version=2.0.0.1,
Culture=neutral, PublicKeyToken=ed0771a7483cd66d
(Fully-specified)
<snip>
LOG: Post-policy reference: WebCustomValidationControls, Version=2.0.0.1,
Culture=neutral, PublicKeyToken=ed0771a7483cd66d
LOG: Found assembly by looking in the GAC.
LOG: Binding succeeds. Returns assembly from
C:\WINDOWS\assembly\GAC_MSIL\WebCustomValidationControls\2.0.0.1__ed0771a7483cd66d\WebCustomValidationControls.dll.
LOG: Assembly is loaded in default load context.

Obviously the problem is that GrangeAJAXComponents is using a partial
binding, but for the life of me i cannot figure out why. Everything about the
way the two dll's are referenced seems to be the same. I've triple-checked
everything and don't know what to try next. Any ideas would be greatly
appreciated.
.



Relevant Pages

  • Re: Where to place class file
    ... not sure but never heard about this automatic reference thing. ... copy local is true then the DLL is copied into the bin directory. ... Now When I compile it and place the dll in the bin and ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: .NET refuses to update due to dual directories?
    ... When you are running an EXE, it runs from the bin directory. ... reference the copy in the obj directory. ... This is because the bin directory contains the EXE and a copy of every dll ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: Dependency question
    ... it tries to copy it to the bin directory ... > and finds the dll you copied there that is of version 1.0.1514.16688. ... > 1- just reference the dll from where it is, it will be copied to the bin ... > "Joe Fallon" wrote in message ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: Dependency question
    ... You have a refernce to that dll that corresponds to version 1.0.1511.33096 ... it tries to copy it to the bin directory ... 1- just reference the dll from where it is, it will be copied to the bin ... "Joe Fallon" wrote in message ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: Assembly Help - Desperate
    ... Don't copy the DLL in the dependent solution's bin directory. ... And reference it from there..... ... > the run directory because it would conflict with dependency 'dll1'. ...
    (microsoft.public.dotnet.framework)