views:

113

answers:

0

Hi,

This is the setup:

I have multiple projects that references 3rd party assemblies (Infragistics).

I reference only a few assemblies in each project, but these assemblies have references in them to other assemblies.

For example:

I reference only "3rdPartyDll-1.dll"

It has a reference to "3rdPartyDll-2.dll"

This means that in design-time, I need "3rdPartyDll-2.dll" to be in the GAC for Visual Studio to find it.

Problem:

I don't want all the assemblies in the GAC.

I tried adding assembly bindings in the file machine.config, but for some reason Visual Studio loads the assemblies twice - the first from the location I tell it in the binding, and the second from the assembly cache (C:\Users[username]\AppData\Local\Microsoft\VisualStudio\9.0\ProjectAssemblies)

Does anyone knows why it loads it twice, or do you have another solution to my problem?

Thanks!!

P.S, fusion logs from the two loads:

First:

Assembly Binder Log Entry (25/07/2010 @ 11:04:46)

The operation was successful. Bind result: hr = 0x0. The operation completed successfully.

Assembly manager loaded from: C:\Windows\Microsoft.NET\Framework\v2.0.50727\mscorwks.dll Running under executable C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE\devenv.exe --- A detailed error log follows.

=== Pre-bind state information === LOG: User = EMEA\ohanat LOG: DisplayName = Infragistics2.Shared.v8.2, Version=8.2.20082.1000, Culture=neutral, PublicKeyToken=792843134cf0407a (Fully-specified) LOG: Appbase = file:///C:/Program Files/Microsoft Visual Studio 9.0/Common7/IDE/ LOG: Initial PrivatePath = NULL LOG: Dynamic Base = NULL LOG: Cache Base = NULL LOG: AppName = NULL Calling assembly : (Unknown).

LOG: This bind starts in default load context. LOG: Using application configuration file: C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE\devenv.exe.Config LOG: Using machine configuration file from C:\Windows\Microsoft.NET\Framework\v2.0.50727\config\machine.config. LOG: Binding succeeds. Returns assembly from C:\Source\Lib\Infragistics2.Shared.v8.2.dll. LOG: Assembly is loaded in default load context.

Second:

Assembly Binder Log Entry (25/07/2010 @ 11:04:54)

The operation was successful. Bind result: hr = 0x0. The operation completed successfully.

Assembly manager loaded from: C:\Windows\Microsoft.NET\Framework\v2.0.50727\mscorwks.dll Running under executable C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE\devenv.exe --- A detailed error log follows.

=== Pre-bind state information === LOG: User = EMEA\ohanat LOG: Where-ref bind. Location = C:\Source\Lib\Infragistics2.Shared.v8.2.dll LOG: Appbase = file:///C:/Program Files/Microsoft Visual Studio 9.0/Common7/IDE/ LOG: Initial PrivatePath = NULL LOG: Dynamic Base = NULL LOG: Cache Base = NULL LOG: AppName = NULL Calling assembly : (Unknown).

LOG: This is an inspection only bind. LOG: Using application configuration file: C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE\devenv.exe.Config LOG: Using machine configuration file from C:\Windows\Microsoft.NET\Framework\v2.0.50727\config\machine.config. LOG: Attempting download of new URL file:///C:/Source/Lib/Infragistics2.Shared.v8.2.dll. LOG: Assembly download was successful. Attempting setup of file: C:\Source\Lib\Infragistics2.Shared.v8.2.dll LOG: Entering run-from-source setup phase. LOG: Assembly Name is: Infragistics2.Shared.v8.2, Version=8.2.20082.1000, Culture=neutral, PublicKeyToken=792843134cf0407a LOG: Binding succeeds. Returns assembly from C:\Source\Lib\Infragistics2.Shared.v8.2.dll.