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

Improve the error experience when the reading of the runtime.json fails due to a malformed file #8203

Closed
nkolev92 opened this issue Jun 6, 2019 · 1 comment
Labels
Area:ErrorHandling warnings and errors/log messages & related error codes. Functionality:Restore Priority:3 Issues under consideration. With enough upvotes, will be reconsidered to be added to the backlog. Style:PackageReference
Milestone

Comments

@nkolev92
Copy link
Member

nkolev92 commented Jun 6, 2019

Right now that will lead to an error like the following:

C:\Program Files\dotnet\sdk\3.0.100-preview5-011568\NuGet.targets(121,5): error : After parsing a value an unexpected character was encountered: ". Path 'alpine-x64-corert.#import', line 24, position 4. [F:\test\7351\7351.csproj]

To repro this:

Create a project, and add runtime identifiers and run restore.
To provide a bad runtime json, either:

  1. Redirect to a custom global packages folder and make edits to microsoft.netcore.platforms in a breaking way (you might need to disable the fallback folder otherwise NuGet will never download it).
  2. Create your own package with a runtime.json.

Found while working on #7351.

Note that this has been an issue for a very long time and we have heard no reports whatsoever.
Mostly because no one really authors runtime.json that frequently :)

@nkolev92 nkolev92 added Functionality:Restore Area:ErrorHandling warnings and errors/log messages & related error codes. Style:PackageReference labels Jun 6, 2019
@nkolev92 nkolev92 added this to the Backlog milestone Jun 6, 2019
@nkolev92 nkolev92 added Priority:3 Issues under consideration. With enough upvotes, will be reconsidered to be added to the backlog. Sprint 154 labels Jun 6, 2019
@nkolev92
Copy link
Member Author

Closing as low pri

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area:ErrorHandling warnings and errors/log messages & related error codes. Functionality:Restore Priority:3 Issues under consideration. With enough upvotes, will be reconsidered to be added to the backlog. Style:PackageReference
Projects
None yet
Development

No branches or pull requests

2 participants