Visual Studio 2015中运行ASP.NET Core报错:无法启动调试及新建项目异常
Hey there, let's work through this issue together— I dealt with similar headaches when using VS2015 with .NET Core a while back, so here are the fixes that got me back up and running:
1. Confirm SDK Version Compatibility with VS2015
Visual Studio 2015 only supports .NET Core SDK versions up to 1.1.x— any SDK 2.0 or later won’t work with it. Here’s how to check and fix this:
- Open Command Prompt and run
dotnet --versionto see your current SDK version - If it’s higher than 1.1.x, uninstall that SDK and install the matching .NET Core 1.1 version
- Also, double-check you have Visual Studio 2015 Update 3 installed— this is a non-negotiable prerequisite for running .NET Core projects in VS2015
2. Repair Visual Studio’s .NET Core Tooling Components
Corrupted tooling often causes failures when creating or launching projects:
- Go to Windows "Programs and Features", find "Microsoft Visual Studio 2015", click "Change"
- Select "Modify", expand "Cross Platform Mobile Development", and ensure the "ASP.NET Core (including .NET Core)" option is checked
- Click "Update" to reinstall the relevant components
3. Fix the Project’s global.json SDK Version
Existing projects might have a version mismatch in their configuration file:
- Navigate to your project’s root folder and open
global.json - Make sure the
sdk.versionvalue matches the .NET Core SDK you have installed, like this:{ "sdk": { "version": "1.1.14" } } - If there’s no
global.jsonfile, create one manually in the project root
4. Clear Cache and Rebuild the Project
Corrupted cache files can break project launches:
- Close VS2015, delete the
binandobjfolders from your project directory - Reopen VS, reload the project, run "Clean Solution", then "Build Solution"
- Try launching the debugger again
5. Verify Debug Configuration Settings
Incorrect debug settings can prevent the project from starting:
- Right-click your project → Properties → Debug
- Ensure the "Launch" option is set correctly (e.g., "Project" or your intended launch URL)
- Check that the
ASPNETCORE_ENVIRONMENTenvironment variable is set toDevelopment
If none of these steps resolve the issue, a full reinstall of VS2015 Update 3 + .NET Core 1.1 SDK (followed by a system restart) might be your best bet.
内容的提问来源于stack exchange,提问作者donprecious iyeritufu

