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.
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) theBuild
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 disable it.This could happen if you don't have the correct framework installed. Go to https://aka.ms/dotnet-download to get the latest framework.