dougiebrown
Fri Apr 25 08:44:03 CDT 2008
Hi Jeffrey
Thanks for you answer, the AssemblyResolve event does indeed solve my problem!
Cheers
Doug
""Jeffrey Tan[MSFT]"" wrote:
> Hi Doug,
>
> If I understand you completely, you deploy your shared assembly in a shared
> URL so that multiple applications use <CodeBase> element to point to this
> shared URL. By doing this, you need not deploy the shared assemblies to the
> GAC on all the client machines. I think this is why you do not like to use
> the GAC solution. If I have misunderstood you, please feel free to tell me,
> thanks.
>
> Let's call the first directly referenced shared assembly "AssemblyA" and
> call the second indrectly referenced assembly "AssemblyB", can you tell me
> under which <dependentAssembly> do you place the <CodeBase> for the
> dependent assemblies? If you add the extra <CodeBase> for "AssemblyB" under
> the <dependentAssembly> for the "AssemblyA" and it does not work, I think
> it is expected. The fusion will first check the <assemblyIdentity> version
> matches, will it probe <CodeBase>. That's why we have to add an explict
> <dependentAssembly> for that "AssemblyB".
>
> Our original Fusion developer explains <CodeBase> element usage in details
> here:
> "Codebase hint in config files"
>
http://blogs.msdn.com/junfeng/archive/2004/11/16/258081.aspx
>
> Another option for your scenario is using AssemblyResolve event. In this
> event, you can place your own logic to resolve assembly reference. For
> example, you can store the assembly URL in the app.config or registry. The
> code in AssemblyResolve event can query to find the assembly for loading.
>
> Hope this helps.
>
> Best regards,
> Jeffrey Tan
> Microsoft Online Community Support
>
> Delighting our customers is our #1 priority. We welcome your comments and
> suggestions about how we can improve the support we provide to you. Please
> feel free to let my manager know what you think of the level of service
> provided. You can send feedback directly to my manager at:
> msdnmg@microsoft.com.
>
> ==================================================
> Get notification to my posts through email? Please refer to
>
http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
> ications.
>
> Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
> where an initial response from the community or a Microsoft Support
> Engineer within 1 business day is acceptable. Please note that each follow
> up response may take approximately 2 business days as the support
> professional working with you may need further investigation to reach the
> most efficient resolution. The offering is not appropriate for situations
> that require urgent, real-time or phone-based interactions or complex
> project analysis and dump analysis issues. Issues of this nature are best
> handled working with a dedicated Microsoft Support Engineer by contacting
> Microsoft Customer Support Services (CSS) at
>
http://msdn.microsoft.com/subscriptions/support/default.aspx.
> ==================================================
> This posting is provided "AS IS" with no warranties, and confers no rights.
>
>