Skip to content
This repository was archived by the owner on Dec 18, 2017. It is now read-only.

Show errors when find unsupported framework in project.json #2161

Merged
merged 1 commit into from
Jul 6, 2015

Conversation

ChengTian
Copy link
Contributor

parent #1896

@davidfowl @muratg @troydai

Error in VS:
capture1

Error in command-line tool (dnu restore):
capture

Error in command-line tool (dnu build):
capture2

@ChengTian ChengTian force-pushed the wei/show-errors-on-unknown-framework branch 2 times, most recently from e90d229 to 3e9d074 Compare July 1, 2015 00:26
{
throw new Exception("TODO: project.json parse error");
}

if (diagnostics.HasErrors())
{
var error = diagnostics.First(x => x.Severity == CompilationMessageSeverity.Error);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could there be multiple errors? What should be the output in that case?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point! It's possible that we have more than one unknown framework. I should turn to AggregateException here, in order to represent multiple errors. Fixed in follow-up commit.

@ChengTian ChengTian force-pushed the wei/show-errors-on-unknown-framework branch from a91d904 to e379cec Compare July 2, 2015 18:00
@ChengTian
Copy link
Contributor Author

Fixed behavior of dnu restore, instead of throwing exceptions, we show something like:
capture

@davidfowl
Copy link
Member

:shipit:

@ChengTian ChengTian force-pushed the wei/show-errors-on-unknown-framework branch from e379cec to 4986870 Compare July 6, 2015 17:57
@ChengTian ChengTian merged commit 4986870 into dev Jul 6, 2015
@ChengTian ChengTian deleted the wei/show-errors-on-unknown-framework branch July 6, 2015 18:00
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants