What happened to build time output in Postsharp 5.x

t.hall's Avatar

t.hall

18 Aug, 2018 01:55 PM

Hi,

I've noticed that version 4.x of Postsharp outputs a line like this into the Build log for each assembly it processes:

1> : message : PostSharp 4.3 [4.3.44.0, postsharp-net40-x86-srv.exe, CLR 4.0.30319.461814, Release] complete -- 0 errors, 0 warnings, processed in 412 ms

However, if I upgrade my Nuget packages to 5.x this no longer appears. I LIKE having this line, it shows me 2 things: a) Postsharp is working on the assemblies I expect it to and b) how long it's taking.

How can I enable this for 5.x? For now, I've stuck with 4.x. I've been unable to find an option anywhere to turn this on.

Changing the version of the Visual Studio extension has no effect at all (I'm running the latest 5.x version of the extension). It's to do with the Nuget package level only.

Thanks!
Tom

  1. Support Staff 1 Posted by PostSharp Techn... on 20 Aug, 2018 10:45 AM

    PostSharp Technologies's Avatar

    Hi Tom,

    the severity of this message has been changed from ImportantInfo (till PostSharp 4.3) to Info (since PostSharp 5.0). To see this message, you need to build your project with normal verbosity of MSBuild. This verbosity is default for MSBuild command line interface, but Visual Studio uses minimal verbosity by default, which now hides this message.

    (See https://docs.microsoft.com/en-us/visualstudio/msbuild/msbuild-comma... .)

    Best regards,
    -tony

  2. 2 Posted by t.hall on 20 Aug, 2018 07:40 PM

    t.hall's Avatar

    OK. Well, 5.0 takes almost twice as long to process each DLL as 4.3 and turning on Normal build verbosity just pollutes the log with tons of irrelevant stuff so I will stick with 4.3. And that's with compiled images and multiple builds so everything is in cache.

    We don't need any features of 5.0 so for now I'll just leave it alone as 4.3 is still supported.

    Please reconsider the output of the build time as ImportantInfo rather than Info or some way to turn it on. I consider it Important Info to show it's actually working but maybe others had good reason to have asked it to be turned off...

    Thanks!
    Tom

  3. Support Staff 3 Posted by PostSharp Techn... on 21 Aug, 2018 03:52 PM

    PostSharp Technologies's Avatar

    Hi Tom,

    there's been a lot of changes in PostSharp Compiler since 5.0 which have impact on performance mainly because of .NET Core support. It took some time to stabilize the features and now we're going to focus on performance improvement.

    We have discussed possibilities to allow setting up the severity of the summary message, but the conclusion is to keep it constant. To get a confirmation that PostSharp has passed successfully, you can work with MSBuild property PostSharpExitCode, which is crated by target PostSharp30Core. (PostSharpCore since PostSharp 6.0.)

    For example:

    <Target Name="CheckPostSharp" AfterTargets="PostSharp30Core">
        <Message Text="PostSharp has succeeded." Importance="High" Condition="'$(PostSharpExitCode)'=='0'" />
        <Error Text="PostSharp has failed." Condition="'$(PostSharpExitCode)'!='0' AND '$(PostSharpExitCode)'!=''" />
        <Error Text="PostSharp has not been executed." Condition="'$(PostSharpExitCode)'==''" />
      </Target>
    

    Best regards,
    -tony

  4. t.hall closed this discussion on 25 Aug, 2018 07:07 PM.

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

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