none
Processor architecture - which is loaded first from the GAC RRS feed

  • Question

  • If you have 2 otherwise identical assemblies in the GAC, but one is compiled as MSIL, and the other for a specific processor architecture, what determines which is loaded ? And a follow up question, does anybody know of a reason whether it should matter ?

    The scenario that prompted these questions is an unexpected 'Method xxx can not be reflected' error in SSIS, and when checking the server I found both an MSIL and an x86 version of the assembly that contained the relavent class, and I'm trying to find out if that could be the reason for the error.


    Microsoft CRM MVP - http://mscrmuk.blogspot.com  http://www.excitation.co.uk
    Friday, June 25, 2010 1:22 PM

Answers

  •  

    I used to work on a thread which discussed something related to this topic, the order seems to be:

     

    myassembly, version=3.0.0.0, culture=neutral, publickeytoken=4a3c0a4c668b48b4, processorarchitecture=x86 ( processorarchitecture will be different under different CPU platform, see here).

     

    myassembly, version=3.0.0.0, culture=neutral, publickeytoken=4a3c0a4c668b48b4, processorarchitecture=msil

     

    myassembly, version=3.0.0.0, culture=neutral, publickeytoken=4a3c0a4c668b48b4


    Sincerely,
    Eric
    MSDN Subscriber Support in Forum
    If you have any feedback of our support, please contact msdnmg@microsoft.com.
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.
    Welcome to the All-In-One Code Framework! If you have any feedback, please tell us.
    Monday, June 28, 2010 11:06 AM

All replies

  • I don't think unless these two are of two different version they can be deployed in GAC together.

    If this is the case then whatever version your app will reference to will be loaded in the process of the calling application.


    Vidya Vrat Agarwal. http://dotnetpassion.blogspot,com
    Friday, June 25, 2010 6:50 PM
  • Isn't this a web service error, or at least one where wsdl is involved? This error generally seems to be a mismatch between the spec of a method (wsdl, Xml etc) and the actual assembly.
    Phil Wilson
    Friday, June 25, 2010 11:28 PM
  • Thanks for the replies, though the question still remains.

    Vidya, it is possible to have 2 assemblies with the same version in the GAC if they have different compilation options (the assemblies go in the respective GAC-32, GAC_MSIL etc folders)

    Phil, I agree with your diagnosis. My problem is that I don't know which assembly file (the MSIL or the x86 version) is being loaded.


    Microsoft CRM MVP - http://mscrmuk.blogspot.com  http://www.excitation.co.uk
    Sunday, June 27, 2010 7:12 PM
  •  

    I used to work on a thread which discussed something related to this topic, the order seems to be:

     

    myassembly, version=3.0.0.0, culture=neutral, publickeytoken=4a3c0a4c668b48b4, processorarchitecture=x86 ( processorarchitecture will be different under different CPU platform, see here).

     

    myassembly, version=3.0.0.0, culture=neutral, publickeytoken=4a3c0a4c668b48b4, processorarchitecture=msil

     

    myassembly, version=3.0.0.0, culture=neutral, publickeytoken=4a3c0a4c668b48b4


    Sincerely,
    Eric
    MSDN Subscriber Support in Forum
    If you have any feedback of our support, please contact msdnmg@microsoft.com.
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.
    Welcome to the All-In-One Code Framework! If you have any feedback, please tell us.
    Monday, June 28, 2010 11:06 AM