Creating files in the GAC at runtime RRS feed

  • Question

  • Hi;

    I'm working with a 3rd party product that has a managed assembly and two native DLLs - identical except one is x86 the other x64.

    The managed assembly has these DLLs embedded as resources and when we load and invoke the assembly it extracts these dlls, creates disk files for them, and copies the embedded binary into the created files then loads one or the other a a native DLL.

    The folder that it creates these files in is always the same as the folder from which the assembly itself was loaded, it creates either an x64 or x86 sub folder and that is where the native dll eventually appears.

    This works fine - but it also seems to work when the assembly has been installed into the GAC - with process explorer I can see what seem to be actual folders created within the GAC "file system" and I am trying to find out if this is good or bad practice or if there are risks.

    I am seeing what might be an oddity with Win 8 in that elevated permissions seem to be needed for this to work - but this is just a suspicion and hard to pin down.

    Does anyone with expertise in this are have any views on this?



    Sunday, July 7, 2013 1:47 PM


  • Hi ,

    The applicaiton itself runs in full trust so it can perform any operations like the ones specied above .

    CLR had  its own security transparency levels and manages the app using the same

    one advantage of  using the GAC as partially trusted callers can [perform operations that require full trust by calling the functions in the assembly loaded in GAC



    • Marked as answer by Min Zhu Wednesday, July 17, 2013 8:34 AM
    Wednesday, July 10, 2013 6:19 PM