Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Comments in project.json array literals incorrectly read as array elements

See original GitHub issue

Steps to reproduce

Add the following to your project.json

"buildOptions": {
  "embed": {
    "exclude": [

Expected behavior

Application runs as expected with the fr resources.dll (if “” exists, this isn’t necessary to reproduce) in the output since there is nothing in the exclude array.

Actual behavior

> dotnet run
Illegal characters in path.
Parameter name: path

Same output is in build, publish and some others since it seems to attempt to interpret //"" as a path

Environment data

dotnet --info output:

.NET Command Line Tools (1.0.0-rc2-002678)

Product Information:
 Version:     1.0.0-rc2-002678
 Commit Sha:  3b2ea9d14b

Runtime Environment:
 OS Name:     Windows
 OS Version:  10.0.10586
 OS Platform: Windows
 RID:         win10-x64

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

peterblazejewiczcommented, May 15, 2016

That’s the point: from my perspective (someone new to C#/.NET stack) that’s perfectly illegal to use comments in JSON: So for me that’s not an issue

shedermancommented, May 14, 2016

JSON.Net supports comments

Read more comments on GitHub >

github_iconTop Results From Across the Web

Expected a JSON object, array or literal.json
1. It'd help to see the stack trace and what led to the error. · I'm trying to store quotes in JSON and...
Read more >
Treat JSON types more literally · Issue #26552
I'm wanting the same: ability to import a json as a const literal and get appropriate union types. My json file is a...
Read more >
(PostgreSQL 11) Reading in an array of JSON objects (or ...
1 Answer. I didn't find a clear explanation in the docs of the reason why the COPY command wants to have the JSON...
Read more >
SyntaxError: JSON.parse: bad parsing - JavaScript | MDN
This string has to be valid JSON and will throw this error if incorrect syntax was encountered. Examples. JSON.parse() does not allow trailing ......
Read more >
A beginner's guide to JSON, the data format for the internet
While the key is any string, the value can be a string, number, array, additional object, or the literals, false , true and...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Post

No results found

github_iconTop Related Hashnode Post

No results found