Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

PostSharp causes build error
camainc
#1 Posted : Tuesday, August 7, 2018 7:11:55 PM(UTC)
Rank: Newbie

Groups: Registered
Joined: 8/7/2018(UTC)
Posts: 2
Location: United States of America

I am getting the following project build error in NCrunch:

NCrunch: This project was built on server '(local)'
..\packages\PostSharp.6.0.24\build\PostSharp.targets (333, 5): The plug-in "PostSharp.Patterns.Diagnostics.Weaver" required by "PostSharp.Patterns.Diagnostics.ILogAspect" was not found.

There are a couple of older posts on StackOverflow about this, and I tried the suggested fixes, but none of them work for me.

I have added an additional file to the project by pointing at

C:\source\Workspaces\WINS\Dev\packages\PostSharp.Patterns.Diagnostics.6.0.24\tools\PostSharp.Patterns.Diagnostics.Weaver.dll

but that doesn't seem to make any difference.

Any suggestions?
Remco
#2 Posted : Tuesday, August 7, 2018 11:10:49 PM(UTC)
Rank: NCrunch Developer

Groups: Administrators
Joined: 4/16/2011(UTC)
Posts: 6,975

Thanks: 929 times
Was thanked: 1257 time(s) in 1170 post(s)
Hi, thanks for sharing this issue.

Does adding your entire packages directory to your 'Additional files to include' setting make any difference here? From what I can establish by googling around, it seems that this build target is trying to find the DLL using a relative file path, which suggests that making sure the file is copied to the NCrunch workspace should resolve the issue.
camainc
#3 Posted : Tuesday, August 7, 2018 11:21:41 PM(UTC)
Rank: Newbie

Groups: Registered
Joined: 8/7/2018(UTC)
Posts: 2
Location: United States of America

I dropped the dll from the packages folder into the appdata\local\ncrunch folder. Is that the correct spot? There are a couple of subfolders in there too, so I wasn't sure. At any rate, that doesn't make any difference, unless I have to restart visual studio or something.
Remco
#4 Posted : Tuesday, August 7, 2018 11:30:36 PM(UTC)
Rank: NCrunch Developer

Groups: Administrators
Joined: 4/16/2011(UTC)
Posts: 6,975

Thanks: 929 times
Was thanked: 1257 time(s) in 1170 post(s)
I recommend having a read up on how NCrunch uses its workspaces and how to best control them:

Workspaces
Implicit file dependencies
Additional files to include

You should avoid making any changes to workspaces created by NCrunch. The files in workspaces should never be manipulated directly and should only be touched by the NCrunch engine itself. In the case of the issue you're solving, the most important thing is that NCrunch is aware of ALL the files that need to exist in each project's workspace in order for the project to be successfully built by MSBuild. Somehow, there's a reference here that's being missed. If you can ensure NCrunch is made aware of this file using configuration, it can be copied into the workspace where it will be found at build time. Adding your entire packages directory to the 'additional files to include' setting is usually a blunt way to ensure nothing is being missed, as the dependency structures in the build system can sometimes be quite complex and simply including the missing file on its own may not always be enough.
Users browsing this topic
Guest
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

YAF | YAF © 2003-2011, Yet Another Forum.NET
This page was generated in 0.036 seconds.
Trial NCrunch
Take NCrunch for a spin
Do your fingers a favour and supercharge your testing workflow
Free Download