Geeks With Blogs

News My Blog has been MOVED to
Michael Freidgeim's OLD Blog My Blog has been MOVED to
After some merge of source code branches I've got a build error
 POSTSHARP : error PS0052: The plug-in "PostSharp.Patterns.Diagnostics.Weaver" required by the type "PostSharp.Patterns.Diagnostics.ILogAspect" was not found. 

I wasn't able to find immediately which code caused the error, and google also didn't give me an answer.
After some investigation I found that PSproj file had missing entries for PostSharp.Toolkit.Diagnostics.Weaver.dll and PostSharp.Toolkit.Diagnostics.Weaver.NLog.dll.

It will be easier if error PS0052 will include name and line from PSproj file

<Project xmlns="" xmlns:dg="clr-namespace:PostSharp.Patterns.Diagnostics;assembly:PostSharp.Patterns.Diagnostics" ReferenceDirectory="{$ReferenceDirectory}" >
  <Property Name="LoggingBackEnd" Value= "nlog " />
  <Using File="default" />
  <!-- if the following 2  entries will be missing, it would cause PS0052 error -->
<Using File="..\..\..\packages\PostSharp.Toolkit.Diagnostics.NLog.\tools\PostSharp.Toolkit.Diagnostics.Weaver.NLog.dll" />
  <Using File="..\..\..\..\packages\PostSharp.Toolkit.Diagnostics.\tools\PostSharp.Toolkit.Diagnostics.Weaver.dll" /> 
    < dg:LoggingProfile Name =" Exceptions" OnExceptionOptions="IncludeParameterType | IncludeParameterName | IncludeParameterValue | IncludeThisArgument" OnEntryLevel="None" OnSuccessLevel =" None" />

    <!-- Add exception logging to everything  .-->
    < LogExceptionAttribute xmlns="clr-namespace:PostSharp.Patterns.Diagnostics;assembly:PostSharp.Patterns.Diagnostics"  AttributeTargetAssemblies="MyProj.ServiceInterfaces" AttributeTargetTypes="MyProj.ServiceInterfaces.*" AttributeTargetMembers= "*" />
Posted on Sunday, August 11, 2013 2:57 PM Visual Studio/TFS/git , PostSharp | Back to top

Comments on this post: POSTSHARP error PS0052: The plug-in "PostSharp.Patterns.Diagnostics.Weaver" was not found

No comments posted yet.
Your comment:
 (will show your gravatar)

Copyright © Michael Freidgeim | Powered by: