There was a change made in 2.0 about binding policies that caused this; I
don't much care for it either. It used to be that if you used LoadFile it
would ignore policy and bind to the file, but that changed; if the same
assembly identity is in the GAC then that it is the one that gets used. This
blog explains it:
http://blogs.msdn.com/junfeng/archive/2004/11/03/252033.aspx IMO Crystal Reports should change the version number for each released
assembly version.
The only workaround I know of is to host the runtime yourself (
http://msdn2.microsoft.com/en-us/library/9x0wh2z3(VS.80).aspx) and override
the CLR assembly manager to establish your own loading and binding rules
using the IHostAssemblyManager interface
(
http://msdn2.microsoft.com/en-us/library/ms164458(VS.80).aspx). There's a
book that describes all these interfaces....
....or don't use Crystal Reports.
[quoted text, click to view] <pdxfilter-google@yahoo.com> wrote in message
news:1147136026.467687.135450@j33g2000cwa.googlegroups.com...
> Here's a fun one:
>
> Our Windows Forms application uses the Crystal Reports .NET assemblies,
> which we ship and reference privately from our application folder.
> These assemblies have strong names. Works great - most of the time.
>
> Other vendors of Crystal applications will often register these DLLs in
> the GAC, which should be fine. The problem is that Crystal Decisions
> sometimes does not change the assembly version when releasing DLL
> updates. So, what happens is our application loads, binds to a
> particular DLL version, the CLR loader finds this exact version in the
> GAC and loads from the GAC instead of our app folder. This is
> problematic as the "sub-versions" are not compatible with each other
> and our app crashes.
>
> This is new in the 2.0 framework. Under 1.1, our app would always load
> the private assembly.
>
> Our question: How do we force the CLR loader to ignore the GAC and
> always load these assemblies from the app folder? I've experimented
> with many config file combinations - to no avail. Also ran
> FUSLOGVW.exe, which happily announced that the assembly was found in
> the GAC - no need to look further.
>
> Crystal Decisions was no help.
>
> Ideas on this? Something I might be missing? Thanks!
>
> Jon
>