Skip to content

Scaffold-DbContext causes "Invalid JSON file in..." if project.json includes comments #5704

@rjpaulsen

Description

@rjpaulsen
  1. If I update my project.json includes a comment, like this:
  // required for EF
  "buildOptions": {
    "emitEntryPoint": true
  },
  1. Then I run this:
    Scaffold-DbContext {ConnectionString} Microsoft.EntityFrameworkCore.SqlServer
  2. I get the error:

Invalid JSON file in C:\Users...\project.json

  1. It works correctly if I change step 1 to look like this:
  "buildOptions": {
    "emitEntryPoint": true
  },

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions