我在编译项目时遇到了以下警告:
6>C:\prj\InternalWSvc\development\BusinessLayer\BOMnt.cs(39,31,39,50(: 警告 PS0114: "BusinessLayer.BOMnt.GetAllTimerServices(System.Nullable, System.Nullable, System.Boolean, System.Boolean, System.String, System.Nullable("上的冲突方面: 转换"Model.Helper.MiniProfilerStepAttribute: Wraped by advice(s( OnEntry, OnExit" 和 "Model.Helper.MiniProfilerStepAttribute: Wraped by advice(s( OnEntry, OnExit" 不是可交换的,但它们不是强排序的。它们的执行顺序是不确定的。 6>C:\prj\InternalWSvc\development\BusinessLayer\BOMnt.cs(39,31,39,50(:消息 PS0124:先前警告的依赖项的详细信息: 6>C:\prj\InternalWSvc\development\BusinessLayer\BOMnt.cs(39,31,39,50(: 消息 PS0124: Model.Helper.MiniProfilerStepAttribute: 标记之前 (0(: 6>C:\prj\InternalWSvc\development\BusinessLayer\BOMnt.cs(39,31,39,50(: 消息 PS0124:(无依赖关系( 6>C:\prj\InternalWSvc\development\BusinessLayer\BOMnt.cs(39,31,39,50(: 消息 PS0124: Model.Helper.MiniProfilerStepAttribute: 标记之前 (1(: 6>C:\prj\InternalWSvc\development\BusinessLayer\BOMnt.cs(39,31,39,50(: 消息 PS0124:(无依赖关系( 6>C:\prj\InternalWSvc\development\BusinessLayer\BOMnt.cs(39,31,39,50(: 消息 PS0124: Model.Helper.MiniProfilerStepAttribute: 由建议包装 在入口时,在出口时: 6>C:\prj\InternalWSvc\development\BusinessLayer\BOMnt.cs(39,31,39,50(: 消息 PS0124: 操作=顺序, 位置=之后, 条件={等于 "Model.Helper.MiniProfilerStepAttribute: 标记之前 (1("} 6>C:\prj\InternalWSvc\development\BusinessLayer\BOMnt.cs(39,31,39,50(: 消息 PS0124: 操作=顺序,位置=之前,条件={等于"Model.Helper.MiniProfilerStepAttribute: 标记 AFTER (1("} 6>C:\prj\InternalWSvc\development\BusinessLayer\BOMnt.cs(39,31,39,50(: 消息 PS0124: Model.Helper.MiniProfilerStepAttribute: 由建议包装 在入口时,在出口时: 6>C:\prj\InternalWSvc\development\BusinessLayer\BOMnt.cs(39,31,39,50(: 消息 PS0124: 操作=顺序, 位置=之后, 条件={等于 "Model.Helper.MiniProfilerStepAttribute: 标记之前 (0("} 6>C:\prj\InternalWSvc\development\BusinessLayer\BOMnt.cs(39,31,39,50(: 消息 PS0124: 操作=顺序,位置=之前,条件={等于"Model.Helper.MiniProfilerStepAttribute: 标记 AFTER (0("} 6>C:\prj\InternalWSvc\development\BusinessLayer\BOMnt.cs(39,31,39,50(: 消息 PS0124: Model.Helper.MiniProfilerStepAttribute: 标记 AFTER (0(: 6>C:\prj\InternalWSvc\development\BusinessLayer\BOMnt.cs(39,31,39,50(: 消息 PS0124:(无依赖关系( 6>C:\prj\InternalWSvc\development\BusinessLayer\BOMnt.cs(39,31,39,50(: 消息 PS0124: Model.Helper.MiniProfilerStepAttribute: 标记 AFTER (1(: 6>C:\prj\InternalWSvc\development\BusinessLayer\BOMnt.cs(39,31,39,50(: 消息 PS0124:(无依赖关系( 6>C:\prj\InternalWSvc\development\BusinessLayer\BOMnt.cs(39,31,39,50(: 消息 PS0124: .
这是什么意思,将来如何避免出现?
这意味着您在BusinessLayer.BOMnt.GetAllTimerServices上有两个MiniProfilerStepAttribute实例。
我知道这是一个古老的线程,但也许有人会发现它很有用。在我的情况下,重复是由方面继承引起的。更多细节在这里 https://blog.postsharp.net/post/deeper-into-aspect-inheritance.html