core icon indicating copy to clipboard operation
core copied to clipboard

dotnet.exe (process 12345) exited with code -2147450751

Open ms0713 opened this issue 6 years ago • 4 comments

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???

ms0713 avatar Feb 19 '20 12:02 ms0713

Can you provide a small project that demonstrates this issue? Thanks.

scalablecory avatar Feb 19 '20 20:02 scalablecory

@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 avatar Feb 20 '20 06:02 ms0713

@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'">

carlossanlop avatar Apr 08 '20 18:04 carlossanlop

Closing due to the lack of response.

mairaw avatar May 04 '20 17:05 mairaw