PostSharp logging in wpf applications

dom's Avatar

dom

20 Dec, 2017 08:38 AM

Hi

This isn't so much a question as more of an observation. I'm using PostSharp in the application I'm building and have now got round to implement logging via a combination of PostSharp and Loupe. To describe it as impressive would be an understatement. I have however noticed one small side effect of having this combination as illustrated in the attachment. I know that these supposed errors when viewing xaml files aren't of any consequence given that once it's built they disappear. I was just wondering though if there might be a design time hack to supress them?

regards

Dom

  1. Support Staff 1 Posted by PostSharp Techn... on 20 Dec, 2017 08:47 AM

    PostSharp Technologies's Avatar

    Hi Dom,

    We'll work on this problem in PostSharp 5.1.
    A temporary workaround is to initialize logging in a module initializer (see http://doc.postsharp.net/module-initializer). Ideally you can detect the current process name and set the logging backend to NullLoggingBackend when you detect you're in the designer process.

    I hope this helps.

    -gael

  2. 2 Posted by dom on 20 Dec, 2017 08:49 AM

    dom's Avatar

    Many thanks Gael, I'll try doing just that.

    Regards

    Dom

Reply to this discussion

Internal reply

Formatting help / Preview (switch to plain text) No formatting (switch to Markdown)

Attaching KB article:

»

Already uploaded files

  • Capture.PNG 32.6 KB

Attached Files

You can attach files up to 10MB

If you don't have an account yet, we need to confirm you're human and not a machine trying to post spam.

Keyboard shortcuts

Generic

? 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