When trying to build and run a hello world dotnetcore console app the app closes without any exceptions. On the debug output I see the following.
The program '[13492] dotnet.exe' has exited with code -2147450749 (0x80008083).
My project.json
{
"version": "1.0.0-*",
"buildOptions": {
"emitEntryPoint": true
},
"dependencies": {
"Microsoft.NETCore.App": {
"version": "1.0.0-*",
"type": "platform"
},
"NuGet.CommandLine": "3.4.3"
},
"frameworks": {
"netcoreapp1.0": {
"imports": "dnxcore50"
}
}
}
my program.cs
public class Program
{
public static void Main(string[] args)
{
Console.WriteLine("help me");
Console.ReadLine();
}
}
I am using the latest, VStudio update 3.
This could happen if you don't have the correct framework installed. Go to https://aka.ms/dotnet-download to get the latest framework.
I did have a global.json as @Lex Li and @DavidG proposed. The problem was some leftover bits from RC2. I uninstalled all core components, reinstalled, and rebooted. After that things worked again. Thanks everyone for your other solutions !
I had this same error. It turns out I had no files output in the target bin\Debug\netcoreapp2.1
path. Since there were no files, the process just quit. After investigating I realized that I forgot to re-enable (check) the Build
option for that project in the Configuration Manager. Because the build didn't fail (was skipped) it compiled all the other assemblies and just ran. :) It was an older unloaded project I was just getting back to and forgot I had disabled it.
It could happen if the framework is not selected as well.
In my case the framework was not selected. Target Framework for the project was empty, not sure why. I am using VS 2017. I thought it would default to the lowest or the latest version of .net core installed.
When I selected the Target framework for the project, the breakpoint was getting hit and everything started working as expected.
User contributions licensed under CC BY-SA 3.0