PostSharp5.0/Deployment and Configuration/Configuration/Reducing Build Time/Using Incredi­Build and Post­Sharp Together

Using IncrediBuild and PostSharp Together

Despite all the efforts we put into PostSharp optimizations, building a solution with PostSharp will always take more time than without it. If your build time was already borderline without PostSharp, you may find that it becomes unacceptably slow with PostSharp.

If you are working on large solutions containing a lot of projects that can be built in parallel, you may consider using IncrediBuild.

Note Note

IncrediBuild is a product of Xoreax. PostSharp Technologies is not affiliated to Xoreax.

This topic contains the following sections:

What is IncrediBuild?

IncrediBuild speeds large C# build time for Visual Studio – up to 10x times faster – by transforming every developer’s workstation or build server into a super computer consisting of as many idle CPUs you currently have in your entire network. Instead of working on your 4 or 8 core machine IncrediBuild transforms your workstation into a virtual 200 cores machine. IncrediBuild is already trusted by over 100,000 users at more than 2,000 leading companies.

We at PostSharp have been working with IncrediBuild to make our products compatible. That means that you can now win twice:

  • Lower development time thanks to PostSharp.

  • Lower waiting time thanks to IncrediBuild.

Who benefits from IncrediBuild?

You will find IncrediBuild useful for you if you’re in the following situation:

  • Your total build time is over 2 minutes.

  • Your solution is composed of dozens of projects with loosely coupled dependencies, so that a high level of parallelism can be reached.

Building a solution with IncrediBuild

To build a PostSharp-enabled solution with IncrediBuild:

  1. Download and install IncrediBuild .

  2. Create a file (name it for instance IncrediBuild.xml) in your source folder with the following content:

    <?xml version="1.0" encoding="UTF-8" standalone="no" ?>
    <Profile FormatVersion="1">
      <Tools>
        <Tool Filename="postsharp-net40-x86-native" AllowRemoteIf="/AllowRemote"
         DeriveCaptionFrom="firstparam" SkipIfExistsOutputFileMasks="*.psmap" />
        <Tool Filename="postsharp-net40-x64-native" AllowRemoteIf="/AllowRemote"
         DeriveCaptionFrom="firstparam" SkipIfExistsOutputFileMasks="*.psmap" />
      </Tools>
    </Profile>
  3. Build your solution using the following command line:

    BuildConsole.exe MySolution.sln /Rebuild /Profile=C:\Path\To\IncrediBuild.xml

    Make sure the path to the XML file is correct, otherwise the flag will be silently ignored.