none
NGEN: Runtime error in mscorsvw.exe when installing assembly in native image cache RRS feed

  • Question

  • Hello,

     

    I'm getting an error with NGEN when attempting to install an assembly containing mixed code (both native and managed).

    If I run NGEN from the application directory it does work, but if I use a different folder I get the following:

     

     

    Failed to find dependencies of image D:\PathToFile\dllname.dll because of the following error: The remote procedure call failed. (Exception from HRESULT: 0x800706BE)

        Compiling assembly D:\PathToFile\dllname.dll ...

    Uninstalling assembly D:\PathToFile\dllname.dll because of an error during compilation.

    The remote procedure call failed. (Exception from HRESULT: 0x800706BE)

     

    Prior to these messages, I get a "Runtime Error" message box in mscorsvw.exe

    I suspect it's not able to load some dependencies but the scenario in which NGEN is run is not something we have control of and we can't use the app directory for that.

    Any ideas?

     

    Regards,

    Gabi

     

    • Moved by Alexander Sun Friday, September 30, 2011 8:33 AM CLR problem (From:.NET Framework Setup)
    Wednesday, September 28, 2011 2:27 PM

Answers

  • I'm confused how you install the assembly.

    As I know, you can use Ngen.exe to install assemblies with commands below:

    install [assemblyName | assemblyPath] [scenarios] [config] [/queue[:{1|2|3}]]

     

    If you think that Native Image Service puzzled you, you can pause it:

    Native Image Service

    Before beginning an installation or upgrade, pausing the service is recommended. This ensures that the service does not execute while the installer is copying files or putting assemblies in the global assembly cache


    Paul Zhou [MSFT]
    MSDN Community Support | Feedback to us
    Get or Request Code Sample from Microsoft
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    • Proposed as answer by Paul Zhou Friday, October 7, 2011 4:50 AM
    • Marked as answer by Paul Zhou Monday, October 10, 2011 7:28 AM
    Wednesday, October 5, 2011 6:47 AM

All replies

  • Hi Gabi,

     

    Welcome to the MSDN forum.

     

    I am sorry that this queue is about .NET Framework Setup. In my opinion, your problem is related to CLR, so I will move your thread to CLR forum for better support. Sorry for any inconvenience.

     

    Thanks.

     

    Best Regards,


    Alexander Sun [MSFT]
    MSDN Community Support | Feedback to us
    Get or Request Code Sample from Microsoft
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Friday, September 30, 2011 8:30 AM
  • Hi,

    Could you please show us your commands?

    Why not run the NGEN and iuput "cd ..." to the directory?

     


    Paul Zhou [MSFT]
    MSDN Community Support | Feedback to us
    Get or Request Code Sample from Microsoft
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Monday, October 3, 2011 7:09 AM
  • @Alexander:

    Thanks for that, as long as it gets better exposure it's OK! I didn't find anything relevant in the CLR forums so it made more sense to post here. 

     

    @Paul:

    It's not as simple as that. We have no control over the NGEN command (I mentioned that in my original post) - the call is actually being made by the Native Image Service, so it's out of our hands.

     

    Thanks,

    Gabi

    Monday, October 3, 2011 2:21 PM
  • I'm confused how you install the assembly.

    As I know, you can use Ngen.exe to install assemblies with commands below:

    install [assemblyName | assemblyPath] [scenarios] [config] [/queue[:{1|2|3}]]

     

    If you think that Native Image Service puzzled you, you can pause it:

    Native Image Service

    Before beginning an installation or upgrade, pausing the service is recommended. This ensures that the service does not execute while the installer is copying files or putting assemblies in the global assembly cache


    Paul Zhou [MSFT]
    MSDN Community Support | Feedback to us
    Get or Request Code Sample from Microsoft
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    • Proposed as answer by Paul Zhou Friday, October 7, 2011 4:50 AM
    • Marked as answer by Paul Zhou Monday, October 10, 2011 7:28 AM
    Wednesday, October 5, 2011 6:47 AM