Live data from Hacker News

MSBuild is now open source on GitHub

blogs.msdn.com

171–180 of 185 posts

Re: MSBuild is now open source on GitHub

#171
post #167

Earlier quoted context omitted.

> XML is horrible for that kind of thing, and the declarative, task-based paradigm simply isn't flexible enough. Of course! That's why the Java world uses maven It makes no sense, but hey, it's XML

Task running is more what Ant is for, isn't it? Maven is more of a dependency management tool than a task runner. A lot of Java projects use both tools together for builds. I've never used it, but MSBuild sounds like Microsoft's version of Ant to me.

MSBuild has a lot of Ant-yness to it, yes. However, I quibble with your definition of Maven as a dependency manager--it has one (and the independent implementation that can work with Maven repos is Apache Ivy) but I've never seen a Java project use both. Usually somebody jams some sort of runner into a Maven project as a different build step or something.

Re: MSBuild is now open source on GitHub

#172

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…

>MSBuild was originally designed as a file format for Visual Studio solution and project files, generally intended to be managed by a GUI.

This is its biggest failure. Like, if you use wildcards in a reference inside of MSBuild, Visual Studio (which just parses and loads MSBuild, not saving the semantics of the file) will happily turn those into a list of files and save the list, rather than the wildcard.

> Unfortunately, because of the all too common insistence of many .NET teams on being spoon-fed by Microsoft, a lot of projects stick with MSBuild for their entire end-to-end build process regardless, simply because they believe That Is How Microsoft Wants You To Do It.

This, however, is totally and completely unfair. People stick with MSBuild because there's no other option that works with Visual Studio. Whatever solution one uses must, must, must work with Visual Studio, or it simply won't get off the ground. This is why psake and FAKE are so underloved: because to actually Do Your Job, you need MSBuild, and those don't help with that pain point.

And that sucks. Maybe the kproj stuff will help. But while loads of issues with .NET come from that expectation of spoon-feeding from Microsoft, this really isn't one.

Re: MSBuild is now open source on GitHub

#173
post #158

Would this lead to a Visual Studio on MacOs/Linux one day? (I hope it would)

It's more likely that it would make MonoDevelop more strictly VS compatible. It already opens and saves .sln and .csproj files, but my understanding is that going back and forth between VS and MD can lead to problems.

I'm working on a pretty advanced solution right now (F# + PCLs), everything works both fine both in VS and Mono's xbuild.

Re: MSBuild is now open source on GitHub

#174

Earlier quoted context omitted.

Solution files are easy. Project files (I think you meant project files) are not too hard, if all you want to do is build. Integration with Visual Studio is part of the equation, too.

From memory CMake was only producing VS 2010 project files which then had to be fiddled a bit to upgrade them to 2012 - so a version bump would be appreciated.

CMake supports VS2012-2015 natively in the latest releases.

Re: MSBuild is now open source on GitHub

#175
post #37

Earlier quoted context omitted.

I haven't gotten past the point of where I just hit Ctrl-F5 and Visual Studio builds stuff for me with MSBuild, so I am certainly no expert on it. But I never had the impression that people liked CMake or Automake either. I ask this not as a rhetorical question but as an actual one: are there build systems that aren't hated, or does everyone just hate the one they have to use the most?

Everybody hates some aspects of some of them, in my experience. People also tend to have strongly held preferences in the build system department - it's a bit like text editors. I tend to view it as problem-dependent as to which system is better. If you're all java, you probably want a build tool designed for that language (for example.) Lisp has asdf and friends. My focus (cross platform C/C++ building) has led me t…

The CMake language is just an atrocious mess, but that gets easier with time. The main problem with CMake on Windows is that it is really really slow for large projects (because it has to call back out to CMake to do all sorts of basic stuff) and that debugging CMake errors is horrifically hard (this has improved in recent MSVS generator integration, but I'm stuck w/ VS2008 still).

Re: MSBuild is now open source on GitHub

#176

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…

>MSBuild was originally designed as a file format for Visual Studio solution and project files, generally intended to be managed by a GUI. This is its biggest failure. Like, if you use wildcards in a reference inside of MSBuild, Visual Studio (which just parses and loads MSBuild, not saving the semantics of the file) will happily turn those into a list of files and save the list, rather than the wildcard. > Unfortuna…

> This, however, is totally and completely unfair. People stick with MSBuild because there's no other option that works with Visual Studio.

This is only true for .csproj and .sln files, which are managed by the Visual Studio GUI, and which I've said are a fair and appropriate use for MSBuild.

It is not true for more general-purpose build scripts, which in addition to building the solution also do things such as run tests, prepare reports, hack configuration files, create zip bundles, deploy upgrades, stop and start servers, and so on. For .proj files, all you get from Visual Studio is the XML editor. In theory, you also get IntelliSense; in practice, IntelliSense for MSBuild files is something of an afterthought, and nowhere near enough to make up for the horrible lack of readability and maintainability.

In any case, in most projects that I've worked on, the .proj files were not included in the solution itself and had to be edited separately. On at least one project I was ordered to rewrite perfectly good and easy to read Python build scripts in MSBuild gibberish for no reason other than "that is how Microsoft wants you to do things."

Re: MSBuild is now open source on GitHub

#177

Perhaps we can use this to start making headway in the fight to get rid of make, autotools, and cmake? :)

I come from a Windows background. I've been having a need to do more C programs lately, and I have generally been trying to migrate more towards platform-agnostic configurations. I had started looking at CMake under the promise of a cross-platform build system, but now I see a lot of non-specific complaints about it. Is there something specific you can articulate that is wrong with CMake, and what alternative is there for someone who A) wants to build cross-platform, but B) with as native of tools as possible for those platforms?

In other words, I'd rather not build with GCC on Windows.

Re: MSBuild is now open source on GitHub

#178

Perhaps we can use this to start making headway in the fight to get rid of make, autotools, and cmake? :)

I come from a Windows background. I've been having a need to do more C programs lately, and I have generally been trying to migrate more towards platform-agnostic configurations. I had started looking at CMake under the promise of a cross-platform build system, but now I see a lot of non-specific complaints about it. Is there something specific you can articulate that is wrong with CMake, and what alternative is ther…

Sure, I'll bite.

So, my issue with CMake is that I usually run into it with annoying academic projects, or other weird shit--that doesn't matter, but what does matter is that the code quality tends to correlate pretty well with my personal rage.

When I try to run it on Linux, sometimes it'll just fail because reasons (looking at you, player-stage five years ago). When I try to run it on Windows, I have to fiddle with settings, rerun it a few times, and only grudgingly will it emit a project and directory for me.

And what it does emit? Almost never a properly organized project. Usually a project with a name like "Project1" and some rando layout. Usually I can't even figure out what #defines are being set, because it's hidden away.

I'd much rather people just write simple Makefiles (it can be done!), and a few VS project files, and be done with it. CMake has never once, in the last five years, ever resulted in me looking up from my machine going "Man, that was such a good experience, I'm sure glad we have CMake!".

The JS ecosystem, as crackheaded as it is, is still not 1000th of 1% of the annoyance as dealing with C/C++ using CMake.

Re: MSBuild is now open source on GitHub

#179

Earlier quoted context omitted.

I come from a Windows background. I've been having a need to do more C programs lately, and I have generally been trying to migrate more towards platform-agnostic configurations. I had started looking at CMake under the promise of a cross-platform build system, but now I see a lot of non-specific complaints about it. Is there something specific you can articulate that is wrong with CMake, and what alternative is ther…

Sure, I'll bite. So, my issue with CMake is that I usually run into it with annoying academic projects, or other weird shit--that doesn't matter, but what does matter is that the code quality tends to correlate pretty well with my personal rage. When I try to run it on Linux, sometimes it'll just fail because reasons (looking at you, player-stage five years ago). When I try to run it on Windows, I have to fiddle with…

Ok! Thank you. I think that makes a lot of sense.

Re: MSBuild is now open source on GitHub

#180

Earlier quoted context omitted.

Sure, I'll bite. So, my issue with CMake is that I usually run into it with annoying academic projects, or other weird shit--that doesn't matter, but what does matter is that the code quality tends to correlate pretty well with my personal rage. When I try to run it on Linux, sometimes it'll just fail because reasons (looking at you, player-stage five years ago). When I try to run it on Windows, I have to fiddle with…

Ok! Thank you. I think that makes a lot of sense.

No problem.

And to be fair, there are a couple of folks I trust who have had great success with it--and yet, I never seem to run into those projects when I need them.

Cool VR stuff by the way...hit me up if you'd like to BS about it sometime.

Post reply on HN