Web application won't run

Viewed 2949

ASP.NET Core, NOT framework

I created a web API project a while ago to act as a local development host for some projects we use. This has been working fine. I don't know if I've installed a VS 2017 update between it working and not working. Now, when I launch it, it launches the web browser and then immediately terminates the web application (see output).

I decided to try and rebuild my project by creating a new one, and to my surprise I'm also getting an issue here. I've included the output and steps with which I can produce the issue on my machine.

Output:

code:-32000
message:No script for id: 35
'dotnet.exe' (CoreCLR: DefaultDomain): Loaded 'C:\Program Files (x86)\dotnet\shared\Microsoft.NETCore.App\1.1.2\System.Private.CoreLib.ni.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
The program '[18760] dotnet.exe: Program Trace' has exited with code 0 (0x0).
The program '[18760] dotnet.exe' has exited with code -532462766 (0xe0434352).
The program '[7360] iisexpress.exe: Program Trace' has exited with code 0 (0x0).
The program '[18824] chrome.exe: WebKit' has exited with code -1 (0xffffffff).
The program '[7360] iisexpress.exe' has exited with code 0 (0x0).

Steps to reproduce:

1) Select File | New Project
2) Select Templates > Visual C# > .NET Core > ASP.NET Core Web Application (.NET Core)
3) Click OK
4) Select Web API
5) Verify that "Enable Docker Support" is unchecked and "Authentication" is "No Authentication"
5) Click OK
6) Select Debug | Start Debugging
7) Wait ~20 seconds for the project co crash

I have tried putting a breakpoint on the opening curly brace of the "Main" method, but this is never hit.

Console output using dotnet run:

C:\Projects\WebApplication1>dotnet run
The current project is not valid because of the following errors:
C:\Projects\WebApplication1(1,0): error DOTNET1017: Project file does not exist 'C:\Projects\WebApplication1\project.json'.


C:\Projects\WebApplication1>

I'm unsure why project.json is expected since these were done away with in favour of .csproj files. Looking at the application properties, I can see that the Target Framework is .NETCoreApp1.1. In an attempt to fix this, I've installed .NET Core runtimes (x86 AND x64) versions 1.0.5 and 1.1.2, though I imagine only the 1.1.2 version is needed.

I've also run dotnet --info and I get the following output:

C:\Users\john\Documents\Visual Studio 2017\Projects\WebApplication1>dotnet --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:  10.0.14393
 OS Platform: Windows
 RID:         win10-x86

Installed SDK versions (according to Programs and Features):

.NET Core SDK 1.0.0 (x64) Installer (x64)
.NET Core SDK 1.0.1 (x64)
.NET Core SDK 1.0.3 (x64)
.NET Core SDK 1.0.4 (x64)
Microsoft .NET Core 1.0.0 - SDK Preview 2 (x86)
Microsoft .NET Core 1.0.0 - SDK Preview 2 (x64)
Microsoft .NET Core 1.0.1 - SDK Preview 1.0.0 Preview 2-003131 (x64)
Microsoft .NET Core 1.0.1 - VS 2015 Tooling Preview 2-003131
Microsoft .NET Core 1.0.5 - Runtime (x64)
Microsoft .NET Core 1.0.5 - Runtime (x86)
Microsoft .NET Core 1.1.2 - Runtime (x64)
Microsoft .NET Core 1.1.2 - Runtime (x86)

Other info:

  • I'm running Windows 10 Enterprise N
  • My development environment is Visual Studio Enterprise 2017 version 15.2 (26430.6) release.

How do I get this to work again?

4 Answers
Related