Mark PostSharp-specific types, i.e. "PostSharp.ImplementationDetails_xxxxx" as compiler generated

olaf.kober's Avatar


07 Jul, 2015 07:59 PM

Hi there!

I love PostSharp, and I love NDepend, especially NDepend v6, which is fresh out and provides the long awaited feature to ignore compiler-generated stuff from analysis.

Now, PostSharp (4.1.15) generates some internal types named "PostSharp.ImplementationDetails....", which are not marked as compiler-generated. Thus, those types are identified by NDepend as normal application types. This has the effect that NDepend warns me about namespace dependency cycles or mutually dependent namespaces, all caused by those PostSharp.ImplementationDetails types.

Would it be possible to mark those PostSharp-generated types as compiler generated?

  1. Support Staff 1 Posted by PostSharp Techn... on 08 Jul, 2015 09:19 AM

    PostSharp Technologies's Avatar


    PostSharp already marks types inside "PostSharp.ImplementationDetails...." as [CompilerGenerated]. If some of the types are not marked in your case, then this is a bug.

    We would like to ask you for more details to diagnose this issue. The best option is to provide us with a reproduction project. Or send us the binaries produced by your current project, if that's possible. If you cannot do any of this right now, then describing which classes are missing the [CompilerGenerated] attribute would be a good start.


  2. 2 Posted by olaf.kober on 08 Jul, 2015 09:34 AM

    olaf.kober's Avatar

    Hmm, indeed the [CompilerGenerated] is already there... I'm a bit confused now, not sure what I was looking at yesterday...

    Sorry about that. Closed.

  3. olaf.kober closed this discussion on 08 Jul, 2015 09:34 AM.

Comments are currently closed for this discussion. You can start a new one.

Keyboard shortcuts


? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac