I have a self-written .NET Framework 4.6.2 application (call it Player) dynamically loading self-written .NET Core 2.0 DLLs (call them Game-DLLs). Now I would like to enable creators of .NET Core 2.0 Game DLLs to debug into their code. To do this, the .NET Framework 4.6.2 Player application needs to be started with the "Managed (v4.6, v4.5, v4.0) code" Debugger attached. I can do this manually: Start the Player.exe and choose Debug->Attach from VS's menu, select the correct debugger and it works: I can debug into the .NET Core Game DLL.
Visual Studio IDE (v2017) seems to store debug configurations for .NET Core projects in some very new thus very undocumented "launchSettings.json" file. I managed to specify a launchSetting profile to start the Player.exe but I did not find a way to attach the correct debugger. It turns out that starting the debugger with a launchSetting profile will always choose the "Managed (CoreCLR)" debugger. This starts the exe but debugging is disabled because no symbols are loaded and thus breakpoints do not work.
There is very few documentation about the options in launchSettings.json and the little you can find is all about developing ASP.Net.
Does anybodyknow how to specify the debugger in launchSettings.json OR know a good source of documentation for launchSettings.json?
Thank you!
Additional information:
DLLs that reference the .NET 2.0 standard are INDEED compatible and usable among different flavors of .NET, including .NET Core 2.0, .NET Framework 4.6.2, latest Xamarin, and others. As I mentioned above: This already works and is out of question. I can take a DLL written with .NET Core 2.0 and thus obeying to the .NET Standard 2.0 and load it - dynamically with Assembly.LoadFrom or statically referenced - from an executable running on .NET Framework 4.6.2. This works like a charm.
The only thing is: If I want to debug into the .NET Core DLL in this case, I have to manually setup the debugger. I don't understand why Visual Studio 2017 replaced the very elaborate debugger-setup-project-page by some fast-hack with only the ASP.Net use-case in mind.
The funny thing is: I can even setup Visual Studio Code (in its very well documented "launch.json" file) to use the correct debugger and debug the scenario I described with a single click on the green Play button.
Unfortunately the launchSettings.json-schema is not of much use, I already stepped over it. It lists (somehow) the known Attributes but leaves no clue how they are interpreted or what Values are allowed. For example I suspected the sdkVersion Attribute to somehow help me set the .NET Framework 4.2... Debugger, but it says nothing about what this Attribute is good for neither how to specify some sdk...