Geeks With Blogs

News My Blog has been MOVED to https://mfreidge.wordpress.com
Michael Freidgeim's OLD Blog My Blog has been MOVED to https://mfreidge.wordpress.com
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. 
[C:\Builds\\MAIN_Master\Sources\main\ServiceInterfaces\myProj.csproj]

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="http://schemas.postsharp.org/1.0/configuration" 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.2.1.1.12\tools\PostSharp.Toolkit.Diagnostics.Weaver.NLog.dll" />
  <Using File="..\..\..\..\packages\PostSharp.Toolkit.Diagnostics.2.1.1.12\tools\PostSharp.Toolkit.Diagnostics.Weaver.dll" /> 
  
  <dg:LoggingProfiles>
    < dg:LoggingProfile Name =" Exceptions" OnExceptionOptions="IncludeParameterType | IncludeParameterName | IncludeParameterValue | IncludeThisArgument" OnEntryLevel="None" OnSuccessLevel =" None" />
  </dg:LoggingProfiles>

  <Multicast>
    <!-- Add exception logging to everything  .-->
    < LogExceptionAttribute xmlns="clr-namespace:PostSharp.Patterns.Diagnostics;assembly:PostSharp.Patterns.Diagnostics"  AttributeTargetAssemblies="MyProj.ServiceInterfaces" AttributeTargetTypes="MyProj.ServiceInterfaces.*" AttributeTargetMembers= "*" />
  </Multicast>
</Project>
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: GeeksWithBlogs.net