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

Duplicate errors in the error list window when produce outputs on build checked. #1722

Closed
BillHiebert opened this issue Apr 27, 2015 · 7 comments

Comments

@BillHiebert
Copy link
Contributor

Extra errors are shown when you enable produce outputs on build. Without this checkbox set, the design time host builds returns us the framework that the error belongs to and we format the error message to include this in the msbuild subtype field. This is later picked up by our project system and we push those errors into the corresponding language service which will unify it with existing errors. For produce outputs on build the framework information is not present so we don't know the language svc to pass them to. The fix is for the produce outputs on build to leverage the subtype field of an msbuild canonical error.

The highlighted is missing in the typical error message. If the command line builds wrote the friendly framework name here this would just work. C:\Users\billhie\documents\visual studio 14\Projects\ConsoleApp1\src\ConsoleApp1\Program.cs(12,25,12,34): DNX 4.5.1 error CS0246: The type or namespace name 'MailChimp' could not be found (are you missing a using directive or an assembly reference?)

@barrytang
Copy link

Adding @davidfowl and @balachir.

@davidfowl davidfowl added this to the 1.0.0-beta5 milestone Apr 28, 2015
@davidfowl davidfowl modified the milestones: 1.0.0-beta5, Backlog May 6, 2015
@BillHiebert
Copy link
Contributor Author

@davidfowl
Are you guys planning on addressing this for beta6?

@mayurid
Copy link
Member

mayurid commented Jul 7, 2015

@muratg : this is the bug we discussed today

@muratg muratg modified the milestones: 1.0.0-beta6, Backlog Jul 10, 2015
@troydai
Copy link
Contributor

troydai commented Jul 15, 2015

Adding additional category information representing the framework is deemed difficult. The conversion from roslyn Diagnostic to an error message is a black box implemented in CSharpDiagnosticFormatter.

I'm researching if I can replicate the Diagnostic and put additional information into it so that when it is converted to error message, framwork information is in it.

Another approach is to derive https://github.com/dotnet/roslyn/blob/master/src/Compilers/Core/Portable/Diagnostic/DiagnosticFormatter.cs

@muratg
Copy link
Contributor

muratg commented Jul 15, 2015

If we can't decide/agree on a reasonable fix, I propose postponing it to beta 7

cc @mayurid

@troydai
Copy link
Contributor

troydai commented Jul 15, 2015

I have a fix now. I'm sending a private build for @BillHiebert to test.

@BillHiebert
Copy link
Contributor Author

I verified Troy's changes along with a small tooling change fixes this issue.

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

No branches or pull requests

6 participants