Build/Test Issues

Build error using PostSharp, extending OnExceptionAspect

Started by Atreyu on 5,639 views

Right now I receive the following error when attempting to build a project which creates a custom postSharp aspect.
The project builds normally when performed explicitly in visual studio or on my Teamcity buildserver.

NCrunch however does not build stating:
Argument not specified for parameter 'validOn' of 'Public Sub New(validOn As PostSharp.Extensibility.MulticastTargets)'.


<Serializable()>
<MulticastAttributeUsage(PersistMetaData:=True)>
Public NotInheritable Class ExceptionLoggedAttribute
	Inherits OnExceptionAspect
...


The attribute 'MulticastAttributeUsage' does have a friend argument 'ValidOn' (notice the case change).

PostSharp has recently been updated, can this also be a caching issue for NCrunch? If so, where can I clear the cache for NCrunch?
Hi,

Thanks for sharing this issue. I'm afraid my knowledge of postsharp is fairly limited, but I'll do my best to try and help figure out where this is clashing. Are you making use of any features in the newly introduced PostSharp version?

I think the best plan is to try placing NCrunch in compatibility mode to see if this has any effect on the build. Being a post-build manipulation tool, PostSharp may be expecting a certain project or solution structure when it attempts to adjust your code after NCrunch has built it - and it's entirely possible that modifications in the new version have introduced new assumptions that don't hold true in the NCrunch environment. Using compatibility mode can help to bring the NCrunch build closer to that of a normal build, and may help us to deductively figure out where the problem is.

Don't worry about caching. Every time you restart the NCrunch engine, any kind of build caching or workspacing is thrown away. NCrunch will store code coverage and test results, but none of this will make any difference to the build process.

Post a reply

Log in to reply.