ASP.NET DLL hell

I have a third party workflow software (Captaris Teamplate) referencing an assembly from my project, referencing other assemblies from our project solution via the GAC .

When our application runs, it calls the Captaris Teamplate method to create a workflow process, which in turn uses project assemblies in the GAC to store data in databases.

The problem is compiling my project and removing assemblies from the GAC, replacing them with new versions, but when I run the whole project, Captaris Teamplate throws an error:

Exception type: System.IO.FileNotFoundException
Message: The name of the VBAssembly file or assembly or one of its dependencies was not found.
FileName: VBAssembly
FusionLog: === Pre-binding state information ===
LOG: DisplayName = VBAssembly, Version = 0.0.0.0, Culture = neutral, PublicKeyToken = null

That is, it won't give me the name of the assembly DLL. He tries to find or check the version. Fixing issues like this is like shooting in the dark and it can kill the days of deleting old assemblies that are stored in the ASP.NET temp folder, project folder and website (inetpub) folder, rebooting, etc., Testing for errors , getting an error, looking for other old assemblies, etc.

So my questions are:

  • Is there a way that would allow me to extract more information about this exception, such as the name of the assembly and the version that is missing?
  • Is there an easy way to clear all old build versions from the system at compile time?
  • Any other suggestions for working with this DLL Hell and / or Captaris Teamplate?

We are using ASP.NET version 1.1 with Visual Studio 2003 with Captaris Workflow 5.0.

+1


source to share


7 replies


If at all possible, avoid the GAC. It lends itself to DLL Hell. VBAssembly may be unmanaged and may be removed from the catalog WINDOWS/system32

.



+1


source


Another thing you can do is "force" reference to the version of the assembly you want via web.config. Here is an example of what I have in my web.config to make sure I am accessing the correct version of Crystal Reports in my web application ...

<assemblies>       
   <add assembly="CrystalDecisions.Web, Version=11.5.3700.0, Culture=neutral, PublicKeyToken=692FBEA5521E1304"/>
   <add assembly="CrystalDecisions.Shared, Version=11.5.3700.0, Culture=neutral, PublicKeyToken=692FBEA5521E1304"/>
   <add assembly="CrystalDecisions.ReportSource, Version=11.5.3700.0, Culture=neutral, PublicKeyToken=692FBEA5521E1304"/>
   <add assembly="CrystalDecisions.Enterprise.Framework, Version=11.5.3300.0, Culture=neutral, PublicKeyToken=692FBEA5521E1304"/>            
</assemblies>

      



I'm sure you could do the same to reference your libraries, you just need to make sure they have a strong naming key to reference the PublicKeyToken.

+1


source


Perhaps you can create a binding policy that redirects any assembly request you removed from XXX to the GAC to a new location. See Binding Policy .

+1


source


Use Dependency Walker to find out which dependency is missing.

+1


source


Or you can use .NET Reflector .

However, you can also just call the provider and ask them for help. Most of the time, these guys take a lot of pride in their products, so they'll take the time to help you solve your problem via email or chat. I ran into a similar problem with a third party spreadsheet component I was using, and although the company was in Germany, I was able to quickly fix the problem by rearranging the component to their end and when they sent me the new DLL worked just fine.

+1


source


Probably the most efficient way is to run FusLogVW.exe

(part of the .NET Framework SDK, see Assembly Binding Viewer (Fuslogvw.exe) ), which will log every failed communication failure. This way you can list your application's failed binding attempts.

+1


source


The starting point is to try to use the "Clean Solution" option and then build the solution.

0


source







All Articles