dotnet.exe (process 12345) exited with code -2147450751
Issue Title
dotnet.exe (process 12345) exited with code -2147450751
General
While trying to debug .net core 3.1 console application (C#) in Visual Studio 2019, It is giving the console window displaying info related to dotnet command and with following line: dotnet.exe (process 12345) exited with code -2147450751.
This console application was upgraded to .net core 3.1 from .net core 2.2. It was working fine in debug mode with .net core 2.2 in Visual Studio 2017.
If fresh console application created in VS 2019 with .net core 3.1, it is being debugged successfully.
With .net core 2.2, I was using following file to run the .net core application. Directory.Build.Targets
<Project>
<PropertyGroup Condition=" '$(OS)' == 'Windows_NT' and 'TargetFrameworkIdentifier' == '.NETCoreApp' and '$(SelfContained)' != 'true'">
<Runcommand Condition="'$(PlatformTarget)' == 'x86'">$(MSBuildProgramFile32)\dotnet\dotnet</Runcommand>
<Runcommand Condition="'$(PlatformTarget)' == 'x64'">$(ProgramW6432)\dotnet\dotnet</Runcommand>
</Project>
What can be the issue here???
Can you provide a small project that demonstrates this issue? Thanks.
@scalablecory With small project I m not able to simulate the issue. It's probably how Visual Studio launches dotnet.exe while debugging your code. I also checked launchSettings.json which reads as follows:
{
"profiles":{
"SamplePrifle":{
"commandName": "Project"
}
}
}
I also run the compiled .exe for .net core 3.1 application which is running fine. Just debugging having the issue.
@ms0713 is it possible that one of these conditions is not met and VS doesn't know what to launch?
<PropertyGroup Condition=" '$(OS)' == 'Windows_NT' and 'TargetFrameworkIdentifier' == '.NETCoreApp' and '$(SelfContained)' != 'true'">
Closing due to the lack of response.