I'm developing a legacy x32 unmanaged application that is extended by .NET Framework components.
It worked fine for ages and now it's time to upgrade from .NET Framework to .NET 8.
I wrote a C++ bootstrapper code in which I load coreclr.dll manually (by LoadLibrary("coreclr.dll")) and afterwards I call coreclr_initialize and coreclr_create_delegate.
Everything seems fine, coreclr initializes successfully and I'm able to run my .NET code.
The problem is that I'm doing the bootstrapping in DllMain() on DLL_PROCESS_ATTACH. I'm not sure if it's the right place. MSDN says that heavy operations should be avoided in DllMain. From other hand, everything seems to work fine.
Do you have any suggestions/pros/cons about bootstrapping .NET8 in DllMain?
I'm developing a legacy x32 unmanaged application that is extended by .NET Framework components.
It worked fine for ages and now it's time to upgrade from .NET Framework to .NET 8.
I wrote a C++ bootstrapper code in which I load coreclr.dll manually (by LoadLibrary("coreclr.dll")) and afterwards I call coreclr_initialize and coreclr_create_delegate.
Everything seems fine, coreclr initializes successfully and I'm able to run my .NET code.
The problem is that I'm doing the bootstrapping in DllMain() on DLL_PROCESS_ATTACH. I'm not sure if it's the right place. MSDN says that heavy operations should be avoided in DllMain. From other hand, everything seems to work fine.
Do you have any suggestions/pros/cons about bootstrapping .NET8 in DllMain?