如何从错误列表窗口删除错误 [英] how to delete errors from the error list window

查看:105
本文介绍了如何从错误列表窗口删除错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好,我正在开发项目模板.该项目包含代码文件,我实现了一个msbuild任务来编译它们.我也有一个mef编辑器扩展,可以在编辑代码时显示错误代码并填充错误列表.问题 是,当我编译时,我会重复出错,一次是从构建任务的日志中,一次是从编辑器扩展中.

hello im developing a project template. that project contains code files and i implemented a msbuild task to compile them. i also have a mef editor extension to display the error squigles and populate the error list while the code is been edited. the problem is that when i compile i get the errors repeated, once from the log from the build task and once from the editor extension. how can i solve this?

推荐答案

您可能只需要在没有相同错误的情况下添加错误即可.该错误不会进行任何智能的合并/重复消除,它会简单显示所有注册提供商的错误.构建系统注册一个 将错误构建到错误列表的提供程序.如果您有某种MEF组件也在构建系统之外提供了相同的错误,则需要通过检查列表中的错误来确保不提供重复项,然后再进行操作. 提供自己的.

You likely need to only add your errors if the same errors aren't already present.  The error doesn't do any sort of intelligent merging/duplicate elimination, it simply displays errors for all registered providers. The build system registers a provider that pipes build errors to the error list. If you have some kind of MEF component that is also supplying the same errors outside of the build system you would need to make sure that you don't supply duplicates by examining the errors in the list before providing your own.

Ryan


这篇关于如何从错误列表窗口删除错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆