this one helps. I figured out how to fix this, you need to add the required files to the NCrunch "Additional files to include" configuration. In the NCrunch Tests window, right click on the project which is failing to build and select Configure selected component Under the General section, select the Additional files to include item and click the ... button Click the Add File(s)... button Browse to where the PostSharp.Patterns.Diagnostics.Weaver.dll file is located (in my instance, as I am using NuGet for PostSharp, it is in packages\PostSharp.Patterns.Diagnostics.4.0.39\tools under my solution directory Click Open Repeat steps 3 to 5 for PostSharp.Patterns.Diagnostics.Weaver.Log4Net.dll (in packages\PostSharp.Patterns.Diagnostics.Log4Net.4.0.39\tools) Click OK Close the NCrunch Configuration window
I hope this helps . Diagnostics configuration is stored in solution (.pssln) or project level configuration file (.psproj). These files may not contain required configuration tags or even they may be missing by default. You can open the configuration wizard from smart tag over any method without [Log] attribute. The configuration you are interested in is on the first page (Logging Level). Note that there is "New logging profile..." at the bottom of this page - you can have multiple configurations within one application.
I wish did fix the issue. PostSharp Diagnostics Pattern Library is not supported on .NET 3.5. The same goes for other Pattern Libraries. You would have to use PostSharp itself (Aspect Framework) to implement similar logic.
Hope that helps Using the project wizard instead of the class wizard does that. It sets up everything and it also creates the GlobalAspects.cs file. If the options offered by the wizard are not sufficient, you can manually edit the GlobalAspects.cs file according to http://doc.postsharp.net/multicast-conceptual. The wizard is available by right-clicking the Project you want to add logging to > Add > PostSharp policy... > Diagnostics > Add logging.
Using NCrunch, FxCop Analyzers and "warnings as errors": How to configure warning severity in NCrunch?
around this issue I found a solution: Apparently the .editorconfig needs to be referenced in each project (csproj file). I had my .editorconfig just as a "solution item". So I did this for each project: Right-click project in Solution Explorer. Select Add -> Existing file. Select the .editorconfig file. Do not click "Add". Click the arrow next to "Add" and select "Add as link".
NCrunch Failing to Build Project with PostSharp dependency