roslyn icon indicating copy to clipboard operation
roslyn copied to clipboard

Expose the ProjectExternalErrorReporter from IWorkspaceProjectContext

Open huizhonglong opened this issue 10 years ago • 3 comments

This is related to issue # 14375. Now CPSProjectFactory. GetExternalErrorReporter() will not return an existing reporter for a projectId, but rather create a new one. As we discussed, please expose the ProjectExternalErrorReporter from IWorkspaceProjectContext

@mavasani

huizhonglong avatar Oct 11 '16 19:10 huizhonglong

@mavasani are you going to take care of this?

Pilchie avatar Oct 17 '16 17:10 Pilchie

Actually, I am wondering if we actually need to fix this - AbstractProject already implements the error reporter specific VS interfaces: http://source.roslyn.io/#Microsoft.VisualStudio.LanguageServices/Implementation/ProjectSystem/AbstractProject_IVsReportExternalErrors.cs,10 and you can just cast the IWorkspaceProjectContext to IVsReportExternalErrors or IVsLanguageServiceBuildErrorReporter2 and it will use the project external error reporter to report errors. CPS also does this explicit cast to report errors: https://github.com/dotnet/roslyn-project-system/blob/master/src/Microsoft.VisualStudio.ProjectSystem.Managed/ProjectSystem/LanguageServices/LanguageServiceHost.cs#L51

mavasani avatar Oct 17 '16 17:10 mavasani

Confirmed with @huizhonglong that she is now unblocked and doesn't really need this change.

mavasani avatar Oct 20 '16 23:10 mavasani