Live data from Hacker News

MSBuild is now open source on GitHub

blogs.msdn.com

151–160 of 185 posts

Re: MSBuild is now open source on GitHub

#151

Nobody is seriously going to fork this and create their own port of MSBuild, possibly one of the most mocked and reviled parts of the .NET ecosystem. I do however congratulate the ground level MS staffers on the effort it likely took to convice the Risk and Legal departments that open sourcing something like this won't make their business fail. That must have been trying.

I wonder why they revile it? I have projects that build under it on the command line for when I want to do a scripted release build and not suffer VS2010 (I use it at work, out of my hands).

I haven't had any problems with it; at least it doesn't sit there and silently fail like xcodebuild does on OSX sometimes!

Re: MSBuild is now open source on GitHub

#152
post #64

Earlier quoted context omitted.

What's wrong with MSBuild/XBuild? I just type "msbuild" (or press F5 in VS) and I get result .exe file in 0.2 second. On Linux I type "xbuild" and it's the same. You can use Visual Studio without even knowing msbuild exists. Just occasionally a pre-build or post-build script needs to be added. Makefiles, Gradle or CMake are much slower and very complicated.

MSBuild is a nightmare to debug if you end up writing even moderately complex MSBuild project files. It doesn't help that VS has a completely different implementation of MSBuild which is subtly incompatible with the command-line MSBuild. Also, setting up proper dependency tracking, so that builds are incremental, is considered an "advanced topic", and is extremely difficult to get right in the presence of various kin…

Informative, thanks. I have never ran into problems like that so I wasn't aware of problems with it. Thanks.

Re: MSBuild is now open source on GitHub

#153
post #115

Earlier quoted context omitted.

Typical 'let me mock this because hating on MS on HN is cool' Can you name one build system that people like, and concretely compare how its better than MSBuild, please? Once you do that, please feel free to omit the perfunctory thank you to look unbiased. Also, this would now be community developed, let me know your github handle and I'll see what contributions you made to make it better (oh wait, that would require…

My GitHub handle is the same as my HN username. Go nuts. You'll notice I mainly write .NET software but I won't be contributing to MSBuild. MSBuild is becoming irrelevant with ASP.NET 5 and Roslyn.

Is it becoming irrelevant for C++ projects though?

Re: MSBuild is now open source on GitHub

#154
post #142

IIRC MSBuild was the brain child of Alex Kipman, father of Kinect and HoloLens. As legend tells it he lashed up a demo version over a weekend and pitched it successfully in the corridor shortly thereafter. The rest is history. MSBuild is essentially a clone ant, and it's not a bad tool per se. For the devdiv engineering team it allowed them to get off the horrible pre-msbuild project files. The messiness came with so…

> The messiness came with solution files (since VS uses solution files and project files).

Indeed. Solution files are not only a terrible to work with in general, they are also unmergeable. They are the number one source of broken builds where I work whenever we do branching and merging. Everyone hates them.

Right now we have a two-layer hierarchy: Solutions, which contains projects (which are perfectly mergeable), and projects which contains code. Projects can depend on other projects, and must therefore also be present in the solution.

You thus need to redundantly express dependencies across solutions (which cannot safely be merged), and besides the academical (violating the DRY principle) this causes real world problems.

What would be neat was if we did away with solutions completely and instead you could have projects depend on other projects directly. And that was it.

Then you could create "solution-projects" by adding the actual project you wanted built, which which again might have their own dependencies and everything would resolve itself just nicely.

I'm pretty sure Eclipse already does this, so what's holding Microsoft back?

Re: MSBuild is now open source on GitHub

#155
post #144

Earlier quoted context omitted.

stick with MSBuild for their entire end-to-end build process regardless We do this and couldn't be happier, and it isn't problematic at all. But that may be due to the fact that msbuild itself is used as the master and for a couple of other of things it excels at (typically 'build project X with all possible combinations of platforms/configurations/..."). Anything which is too far away from standard msbuild is done i…

It sounds like you're describing using MSBuild tasks as a shim around C# and Python scripts. While that wouldn't be my natural choice, I'd be happier with it than some of the implementations that I've seen. When I talk about using it for the entire end-to-end build process regardless, I'm talking about people using it to do things that should really have been written in C# or Python, such as manipulating multiple con…

I'm talking about people using it to do things that should really have been written in C# or Python

I know: I hang out a lot in StackOverflow's msbuild tag. While I love figuring out all kinds of weird msbuild ways to solve some of the questions out there, you are completely right that often the entire problem would simply be solved by not using it in the first place or at least trying to stick to what it can be used for and in the way it is meant to be used.

Re: MSBuild is now open source on GitHub

#156

https://github.com/Microsoft/msbuild/commits/master 3 commits. Because MSBuild just happened. The whole point of open source is that you get to go back and see how the software evolved. Git blame. Everybody learns.

So, what about LibreOffice/OpenOffice when it was open-sourced from StarOffice?

Or Blender?

Are they worthless because you can't see how it originally got developed?

Re: MSBuild is now open source on GitHub

#157

Licensed under MIT, impressive.

All of the Microsoft technologies which have been open sourced over the last couple months have been under MIT which is really strange actually as Mono is licensed under LGPL2 which is actually more restrictive! Fancy that, how times have changed.

Well FOSS people would say there is more freedom(tm) with LGPL2. But that's just like an opinion man.

Re: MSBuild is now open source on GitHub

#159

The problem with MSBuild is that it tends to get used for things for which it is not really designed. MSBuild was originally designed as a file format for Visual Studio solution and project files, generally intended to be managed by a GUI. If all you are interested in is spitting out binaries, it works pretty well, and the fact that it adds a ton of extensibility is actually quite useful. It becomes problematic thoug…

I don't agree that people do stick to MSBuild scripts for their build processes - I have seen many .net shops and almost all don't do anything in msbuild because they don't know how.

I see things like ANT scripts and individual steps in things like TeamCity as being far more common.

Re: MSBuild is now open source on GitHub

#160
post #146

Earlier quoted context omitted.

MSBuild is a nightmare to debug if you end up writing even moderately complex MSBuild project files. It doesn't help that VS has a completely different implementation of MSBuild which is subtly incompatible with the command-line MSBuild. Also, setting up proper dependency tracking, so that builds are incremental, is considered an "advanced topic", and is extremely difficult to get right in the presence of various kin…

AFAIK, VS uses the same implementation of the MSBuild engine but has some sleazy (buggy) performance optimizations. Add the property DISABLEFASTUPTODATECHECK=1 to get the same behavior. We found this allowed us to eliminate differences we saw and found hard to track down and infuriating: https://msdn.microsoft.com/en-us/library/vstudio/ms171468%28...

Thanks!

For some reason, when I was wrestling with that problem, all I could find was other people on forums with the same problem, and an acknowledgement that MS tried to keep the differences minimal. (I think, too, that some of the larger discrepancies must have been fixed with newer releases of VS... I recall things breaking even with VS's regular build command, not just when debugging.)

Post reply on HN