次の方法で共有


One step forward, Two steps forward

It was a great day today.  Not just because i went to Mini-golf
with my team and scored a 49 on a par 57 course, but because we finally
completed our migration of the C# IDE source tree to the MSBuild system
We've wanted to do this for quite a long time but we never had the time
to do a full migration and we also kept on running into a few issues
that kept causing problems.  So we worked with the MSBuild team to
resolve all of them, and as of today we now build just fine with their
fantastic system.

Plusses:

  1. Clean build time reduced from 6 minutes 20 seconds to 2 minutes 40 seconds.  That's 40% of the original build time!
  2. The project file is incredibly clean.  We have a simple
    wildcard inclusion will pulls in all *.h's and *.cpp's in our
    directory.  This means we don't have to strugle with keeping a
    project file and our on disk files in sync.  When we add a new
    cpp/h file anywhere in the directory (or subdirectory) MSBuild will
    pull it in
  3. We only have one build system that we use now.  We used to
    use the VS build system for command line builds (what eventually
    produces the final VS sku), and the VC++ build system for building
    within the IDE.   We did this so we could code in the IDE and
    get things like IntelliSense and whatnot.  This meant that we
    always had to keep two systems up to date.  Nothing like trying to
    submit a checkin through our build system and realizing a few hours
    later that you didn't update the command line build system
    properly.  Now we just have one project.  The same project
    builds from the command line or inside the IDE *identically*
  4. Much faster incremental rebuilds.  Because MSBuild watches
    actual file accesses, it can do a much better job determing what to
    rebuild then our old build system.  Faster incremental builds
    means quicker time between making changes and being able to use
    them. 

Minuses:

  1. Nothing

Great job MSBuild team!  This is going to be a big boon for us!

Comments

  • Anonymous
    June 03, 2005
    I have a hand in our company build system and just wanted to understand a little bit about point 3. Am I correct in saying you were previously using lines of "devenv /build <project>" for your old build system? And now with the switch to MSBuild you get faster compilations and improved incremental builds, how comes devenv isn't of comparible speed (if my first assumption is correct). One more thing, I recall sometime ago there was talk about the C++ compiler being able to carry out parallel builds (or perhaps it was the MSBuild system that would be able to do this), will this functionality be able in the RTM of Whidbey?
  • Anonymous
    June 03, 2005
    The comment has been removed
  • Anonymous
    June 04, 2005
    Quote: "We've wanted to do this for quite a long time but we never had the time to do a full migration and we also kept on running into a few issues that kept causing problems."

    So, can you tell us a bit more about what those 'issues' that you bumped into were? Will your solution in the end result in new features for us all in MsBuild?
  • Anonymous
    June 05, 2005
    Luc: "So, can you tell us a bit more about what those 'issues' that you bumped into were? Will your solution in the end result in new features for us all in MsBuild?"

    They were, in general, pretty minor things. For example, we would use it's regexp capabilities to say: "include all .cpp files from all subdirectories", however, after you opened the project file in VS then the regexp would be expanded out to all files that matches and it would get replaces with that list. Thus the regexp would be lost and the project wouldn't pick up any new files added to the directory.
  • Anonymous
    June 05, 2005
    Luc: Plus, MSBuild is getting used to build more and more of the VS source tree (With many teams already using it). The team wants to make sure that they can really handle the most complicated of tasks, and building all of VS is a great test of that.

    So they're very responsive to helping out individual teams to be able to effectively use MSBuild for their own projects. If there and any problems, or needed functionality, then it's very likely that it will soon be in an upcoming build :)

    Hopefully, after being able to support the tons of teams inside VS all of which build differently, they'll be able to handle your system!
  • Anonymous
    June 06, 2005
    The comment has been removed
  • Anonymous
    June 12, 2009
    PingBack from http://cellulitecreamsite.info/story.php?id=6314