Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Auto generated launch.json does not work with ASP.NET Core 1.1 #1126

Closed
scottkuhl opened this issue Jan 15, 2017 · 7 comments
Closed

Auto generated launch.json does not work with ASP.NET Core 1.1 #1126

scottkuhl opened this issue Jan 15, 2017 · 7 comments

Comments

@scottkuhl
Copy link

scottkuhl commented Jan 15, 2017

Environment data

dotnet --info output: .NET Command Line Tools (1.0.0-preview4-004233)
VS Code version: 1.8.1
C# Extension version: 1.6.2

Steps to reproduce

  1. Create a new asp.net core project with yo aspnet.
  2. Pick Web API.
  3. Open in Visual Studio Code.
  4. Restore packages.
  5. Generate a launch.json and tasks.json file.
  6. Debug.

Expected behavior

Browser launches and enters debug mode.

Actual behavior

launch: launch.json must be configured. Change 'program' to the path to the executable file that you would like to debug.

Workaround

Edit the launch.json file from this:

"program": "${workspaceRoot}/bin/Debug//<project-name.dll>",

to this:

"program": "${workspaceRoot}/bin/Debug/netcoreapp1.1/projectname.dll",

See Also

microsoft/vscode#10040

@DustinCampbell
Copy link
Member

Did dotnet restore actually succeed? dotnet version 1.0.0-preview4-004233 only works with .csproj projects, not project json. The yo aspnet generators still generate projects with project.json files.

@scottkuhl
Copy link
Author

I believe it did.

@DustinCampbell
Copy link
Member

When you execute dotnet new do you get a project.json based project, or a .csproj?

@DustinCampbell
Copy link
Member

IOW, my suspicion here is that the "yo aspnet" projects are simply not moved over to .csproj, which is what your installed dotnet CLI expects. There's not much we can do about that in C# for VS Code.

@DustinCampbell
Copy link
Member

@scottkuhl: I'm going to go ahead and close this. I can't help further without more information. That said, I do suspect this is a problem of the "yo aspnet" simply not being moved from project.json to .csproj yet, but you're using a new .NET CLI that only supports .csproj.

@ecnelson
Copy link

ecnelson commented May 2, 2017

So it's still broken... but that's not a bug? I'm confused.

@DustinCampbell
Copy link
Member

@ecnelson: This issue was about using a newer .NET CLI that only supports .csproj .NET Core projects with project.json .NET Core project produced by "yo aspnet". Is that what you're experiencing? If not, please file a separate issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants