aspnetcore: dotnet.exe Crashes with Default ASP.NET Core Web API Project

Steps to Reproduce

  1. Create new ASP.NET Core Web Application (.NET Core)
  2. Start Debugging (F5)

Expected Behavior Empty web application runs using Kestrel and IIS Express.

Actual Behavior Build completes with no errors but web server does not start. Output displays following:

The program '[12780] dotnet.exe' has exited with code -2147450751 (0x80008081).
The program '[1996] iisexpress.exe' has exited with code 0 (0x0).

.NET Info

.NET Command Line Tools (1.0.0-preview2-003121)

Product Information:
 Version:            1.0.0-preview2-003121
 Commit SHA-1 hash:  1e9d529bc5

Runtime Environment:
 OS Name:     Windows
 OS Version:  6.1.7601
 OS Platform: Windows
 RID:         win7-x64

project.json

{
  "dependencies": {
    "Microsoft.NETCore.App": {
      "version": "1.0.0",
      "type": "platform"
    },
    "Microsoft.ApplicationInsights.AspNetCore": "1.0.0",
    "Microsoft.AspNetCore.Mvc": "1.0.0",
    "Microsoft.AspNetCore.Server.IISIntegration": "1.0.0",
    "Microsoft.AspNetCore.Server.Kestrel": "1.0.0",
    "Microsoft.Extensions.Configuration.EnvironmentVariables": "1.0.0",
    "Microsoft.Extensions.Configuration.FileExtensions": "1.0.0",
    "Microsoft.Extensions.Configuration.Json": "1.0.0",
    "Microsoft.Extensions.Logging": "1.0.0",
    "Microsoft.Extensions.Logging.Console": "1.0.0",
    "Microsoft.Extensions.Logging.Debug": "1.0.0",
    "Microsoft.Extensions.Options.ConfigurationExtensions": "1.0.0"
  },

  "tools": {
    "Microsoft.AspNetCore.Server.IISIntegration.Tools": "1.0.0-preview2-final"
  },

  "frameworks": {
    "netcoreapp1.0": {
      "imports": [
        "dotnet5.6",
        "portable-net45+win8"
      ]
    }
  },

  "buildOptions": {
    "emitEntryPoint": true,
    "preserveCompilationContext": true
  },

  "runtimeOptions": {
    "configProperties": {
      "System.GC.Server": true
    }
  },

  "publishOptions": {
    "include": [
      "wwwroot",
      "Views",
      "Areas/**/Views",
      "appsettings.json",
      "web.config"
    ]
  },

  "scripts": {
    "postpublish": [ "dotnet publish-iis --publish-folder %publish:OutputPath% --framework %publish:FullTargetFramework%" ]
  }
}

About this issue

  • Original URL
  • State: closed
  • Created 8 years ago
  • Comments: 21 (1 by maintainers)

Most upvoted comments

I’ve had the same issue, and it turned out that I simply didn’t have the right version of the runtime (1.1.0); instead I was trying to use 1.1.0 assemblies with 1.0.1 runtime.

The resolution is simple - download and install SDK from here, but pick the right version! It turned out that if you want version 1.1.0 you should select “Current” option (button).

Basically the problem is caused by stupid interface at the referenced page - if you don’t pay attention you’ll download v1.0.1 since it is “LTS” version, and “LTS” option is default there. What to say… Yet another disappointment from .NET team in this crazy-versioning, crazy-moniker, crazy-platform times…

Can’t say any of these suggestions fixes the problem for me… quite frustrating. I agree with @peske, the experience of moving to .NET Core has been hell. Every upgrade, something breaks. My 2015 tools were never stable, I’m on 2017 RC now, but they have a whole bunch of new issues, and getting this issue whenever i try to launch my project in 2017.

Started to have this exact problem after upgrading my project’s NetCore.Platform from 1.0.0 to 1.0.1. My project name doesn’t have any dashes, so in my case this isn’t the problem as pointed out by @ChadJessup Been fighting with it a couple of hours without any success.

I encountered this issue today as wel and it was doing my head in. In production (i,e. without the ASPNETCORE_ENVIRONMENT envvar set to Development) my app would crash before even starting, i.e. not really a chance to debug.

The issue more than likely was not going to be in the dotnet runtime, seeing as it would only error out while running MY code in production. So I tried running the command that is in the web.config’s aspnetCore element from the command line:

<aspNetCore processPath="dotnet" arguments=".\Assembly.dll"

as dotnet Assembly.dll

from within the site’s root older as it showed up in Azure. And lo and behold, an error,

at Microsoft.AspNetCore.Hosting.ConventionBasedStartup.ConfigureServices(IServiceCollection services)

Turns out the issue was to do with the DI pipeline of Configure(Services) and in my case, a wrngly configured path to an IdentityServer4 signing cert. The issue was so difficult to find because to to the static nature of the DI process the error was spit out even before it hit actual program I guess,

@peske Amazing that the very valid issue you pointed out 4 months ago re the confusing link still has not been fixed. In any case, VS2017 aspnet core web projects are also still broken ( failing to start ) and that has been for months now as well. Even the basics don’t work with VS2017.

@peske That resoled the issue for me

@jamesabolton - our infrastructure has us rename our projects, and my problem went away. We had dashes in our project names, and this bug seems to have had a similar issue: https://github.com/aspnet/Tooling/issues/736