locked
ICorRuntimeHost->CreateDomainEx returns 0x80131534 RRS feed

  • Question

  • Hello All!

    My C++ console app have tryed to create AppDomain via ICorRuntimeHost->CreateDomainEx and got 0x80131534 error.
    What can cause this?

    PS. On my development PC looks that all works done.

    Thanks,
    Dmitry

    Dmitry Shuklin, http://www.shuklin.com
    Monday, May 25, 2009 1:47 PM

All replies

  • That error is COR_E_TYPEINIALIZATION, "An exception was thrown by a type's initializer (.cctor)".  I can't phantom what kind of static constructor would be invoked when you create a app domain.  Use Debug + Exceptions to make it stop when the exception is thrown.

    EDIT: hang-on, that's a ICorRuntimeHost method.  That's .NET 1.x


    Hans Passant.
    Monday, May 25, 2009 6:49 PM
  • > I can't phantom what kind of static constructor would be invoked when you create a app domain.

    Messed up configuration file, perhaps?
    Monday, May 25, 2009 7:00 PM
  • This is .NET 1.1 mscoree.tlb and VS2003 compiler. Because of this http://social.msdn.microsoft.com/Forums/en-US/vclanguage/thread/a70763e3-8e7d-497b-90fe-1cb53c86a27f I can't use more recent versions of compilers for managed application (( and don't want to use different C++ versions for unmanaged host and managed app. I am running the last version of .NET. The .NET 3.5 is available on PCs so I assume that will be started .NET 2.0 core.

    Because of this http://social.msdn.microsoft.com/Forums/en-US/clr/thread/448f4a8b-35a0-495e-b2df-aedb9f40aafb there is no configuration file for default domain.

    I am trying to create yet another AppDomain with AppDomainSetup and domain.config file.

    I can't use debug because on development PC all runs great, on the test PC any VS does not installed.

    WBR,
    Dmitry


    Dmitry Shuklin, http://www.shuklin.com
    • Edited by Shuklin Monday, May 25, 2009 8:14 PM
    Monday, May 25, 2009 8:09 PM
  • If you have troubles to install VS on the PC where it fails, then try debug your problem via Remote Debugging. Or you can try use windbg debugger which doesn't need installation (you can just copy it over).

    -Karel
    Tuesday, May 26, 2009 6:57 PM
  • Thank You, Karel!

    By design I don't have a rights to change permissions on target PC. I can't run debugger. So I have to use logs for debugging. All I know is that CreateDomainEx  doesn't create AppDomain : punkAppDomain == NULL and hr == 0x80131534 I am assuming that no my static cctors can be fail inside ICorRuntimeHost->CreateDomainEx And I can't say how can help debugging. I expect to see only mscorwks or mscorsrv at the stack. I can't load my code into new domain before it will be created. I want to make pure hosting application without any use of managed code. I am creating domain in the native C++ console app. So I am sure that it is not my cctor.

    WBR, Dmitry

    Dmitry Shuklin, http://www.shuklin.com
    Tuesday, May 26, 2009 7:24 PM