I am trying to Instrument .NET Core web applications that runs on .NET Core 3.1 using CoreCLR Profiler in linux centos7. I have set the environment values CORECLR_PROFILER , CORECLR_ENABLE_PROFILING and CORECLR_PROFILER_PATH, where my CoreCLRProfiler dll gets attached to dotnet.exe and it is getting the callbacks.
I am able to get all the callbacks,but when i allow injecting the code into the Webapplication's method then the app is getting crashed(dotnet.exe gets killed) as it couldnt find the injected function call.
I have created helper assembly(.NET standard 2.0) with the injected functions body and signed it with strong name and installed it in to the GAC. And also used DefineAssemblyRef(),DefineTypeRefByName() and DefineMemberRef() from IMetaDataAssemblyEmit to load assembly and its class methods. And also tried by placing dotnet standard dll in application folder. But the helper assembly is not loaded to dotnet.exe process.
Where should my helper assembly placed..? and
how can I load helper assembly to dotnet process from my native coreclr profiler?
It would be much helpful if i get some correct direction to load or use helper assembly to dotnet process.
Thanks in advance.