I want to call a C# component from an unmanaged c++ service. I need to set config items expected by the C# component. What name should be config be and where should it be located.
eg.
parentfolder\cplusplusservice.exe
anotherfolder\csharp.dll
i need csharp.dll.config or its equivalent.
Thanks,
The .config file needs to be named the same as the application’s name. When the unmanaged code first calls into the managed code an AppDomain is created that AppDomain controls which config file is loaded and from where.
You will need to manually copy the .config file to the output directory and name it after the application name or create a post-build to do so.
Basically the same rules that apply to where .config files need to be for pure managed apps apply to unmanaged apps that load managed code.