To resolve the "the target process exited without raising a coreclr started event. ensure that the target process is configured to use .NET Core. this may be expected if the target process did not run on .NET Core." error, you can follow these steps:
"This error occurs when an expected dependency is missing or is of the wrong version/compatibility level when referenced in the solution.
It happens anytime Visual Studio is trying to execute something but the call of that execution fails.
In my experience, when .NET Core does not have all related components installed like the hosting bundle and the shared .NET Framework libraries for a given SDK version, or any of the other dependency components, then this error will occur.
I've seen .NET Core 3.1 components installed alongside .NET Core 5+ and this error occurs based on that alone.
If anything is wrong with the launchSettings.json for any of the build profiles, then Visual Studio's attempts at starting the application or running any of the commands in the profiles after the build will lead to this error as well.
Recently, I realized that the Microsoft Browser Link library wasn't installed and it also caused this error as the launch browser option in the project was selected.
Noted:
This error will also occur sometimes if browser processes are running for a select browser chosen in the debugging drop-down which conflicts with VS 2019's ability to initiate a browser process for some reason.
"I just encountered the same issue and resolved it, but I'm not sure if it's the same root cause as yours.
In my case, I removed each package and eventually found that the issue is from one package. The package indirectly references Microsoft.NETCore.App (you can find that by checking .deps.json), which references Microsoft.NETCore.Runtime.CoreCLR, and I guess that's not compatible with .NET 5+.
I resolved this issue by updating the package that references Microsoft.NETCore.App to the latest version, which fortunately exists and no longer references it. There are several package version conflicts after it that need to be manually resolved though."
"I was trying to run a project that used .NET Core 2.2, but I didn't have it installed. There was no error (I had 1.1), so after installing 2.2 using the 'Visual Studio Installer', it worked like a charm. =)"
"For me, the issue was that my project was targeting .NET Core 2.2, which I didn't have installed. I'm using Visual Studio 2019.
So, for the solution, just follow these steps: