none
Force application to look for an assembly, first in local then in Gac .. RRS feed

  • Question

  • Hi,

    I've tried many ways to force application to start probing from local folder such as exe.local, manifest, code base etc etc but it always search in the Gac first then look for assembly any where else. Is there any way to force application not to look in the gac first and starts probing from local folder. Second i want to know is there any way to create assembly manifest rather then application manifest.

    thanks ..


    • Edited by Wall.E Friday, March 8, 2013 7:06 AM
    • Moved by Ego Jiang Friday, March 8, 2013 7:08 AM
    Thursday, March 7, 2013 6:16 AM

Answers

  • Hi Mike,

    thanks, but my problem is i can't use code (I'm bound not to use) that's why i'm trying to solve this issue thru config file or other methods like exe.local or different elements like code base and etc. Is there any other way to do this without using code ??

    thanks and regards ..

    Hi Wall,

    Based on my knowing, there is no such config.

    Best regards,


    Mike Feng
    MSDN Community Support | Feedback to us
    Develop and promote your apps in Windows Store
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Wednesday, March 13, 2013 2:01 PM
    Moderator
  • my findings are ..

    first run time tries to find assembly in GAC and after Gac if CodeBase element is present in config file then run time look for assembly at CodeBase location and finish probing if assembly is not present at CodeBase location, if CodeBase element is not present then run time look in the local folder and in the end look at the path of Probing Private Path element if it is present in config file.

    best regards ..

    • Marked as answer by Wall.E Thursday, March 21, 2013 11:19 AM
    Thursday, March 21, 2013 11:07 AM

All replies

  • Hi,

    Based on this case relate to CLR, I am trying to involve someone familiar with this topic to further look at this issue. There might be some time delay. Appreciate your patience.

    Thank you for your understanding and support.

    Best regards,


    Ego [MSFT]
    MSDN Community Support | Feedback to us
    Develop and promote your apps in Windows Store
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Friday, March 8, 2013 7:07 AM
  • Hi Wall,

    From .net 2.0, this can be achieved byhosting CLR, and implementing interface IHostAssemblyManager and IHostAssemblyStore.

    http://blogs.msdn.com/b/junfeng/archive/2006/03/27/561775.aspx

    I hope this blog is helpful.

    Best regards,


    Mike Feng
    MSDN Community Support | Feedback to us
    Develop and promote your apps in Windows Store
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Friday, March 8, 2013 8:12 AM
    Moderator
  • Hi Mike,

    thanks, but my problem is i can't use code (I'm bound not to use) that's why i'm trying to solve this issue thru config file or other methods like exe.local or different elements like code base and etc. Is there any other way to do this without using code ??

    thanks and regards ..

    Friday, March 8, 2013 10:19 AM
  • I might saying something silly, just a though

    If you can create another version of the assembly you might be able to redirect the reference using configuration file http://msdn.microsoft.com/en-us/library/8f6988ab.aspx

    I am not sure if it is possible to resign assembly using a deferent strong name and then redirect using the config and codebase

    you may find more information here http://support.microsoft.com/kb/837908?wa=wsignin1.0

    Friday, March 8, 2013 7:58 PM
  • Hi Avi,

    yes we can redirect assembly to a different version from Gac to any other place by using config file but in this approach an older version of assembly must be present in the Gac and then runtime look for the same assembly with the newer version on specified path by config, but my concern is i do not want my application to look in the gac, i want my application to start looking from local folder ..

    thanks and regards ..


    • Edited by Wall.E Wednesday, March 13, 2013 11:40 AM
    Wednesday, March 13, 2013 11:38 AM
  • Hi Mike,

    thanks, but my problem is i can't use code (I'm bound not to use) that's why i'm trying to solve this issue thru config file or other methods like exe.local or different elements like code base and etc. Is there any other way to do this without using code ??

    thanks and regards ..

    Hi Wall,

    Based on my knowing, there is no such config.

    Best regards,


    Mike Feng
    MSDN Community Support | Feedback to us
    Develop and promote your apps in Windows Store
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Wednesday, March 13, 2013 2:01 PM
    Moderator
  • Hi Mike,

    yep I also came to this conclusion that there is no way thru config files to override the GAC and look directly into local ..

    thanks and regards

    Tuesday, March 19, 2013 7:13 AM
  • my findings are ..

    first run time tries to find assembly in GAC and after Gac if CodeBase element is present in config file then run time look for assembly at CodeBase location and finish probing if assembly is not present at CodeBase location, if CodeBase element is not present then run time look in the local folder and in the end look at the path of Probing Private Path element if it is present in config file.

    best regards ..

    • Marked as answer by Wall.E Thursday, March 21, 2013 11:19 AM
    Thursday, March 21, 2013 11:07 AM