Live data from Hacker News

MSBuild is going cross-platform with .NET Core

blogs.msdn.com

101–110 of 139 posts

Re: MSBuild is going cross-platform with .NET Core

#101

Earlier quoted context omitted.

> Will hard-core Linux users who used Java migrate when it makes sense? Probably only for mobile/desktop app but less likely for back-end/webservice/infrastructure stuff. Take MSBuild. This is pretty much Ant. Sure, there's NuGet but Ant+Ivy or MSBuild+NuGet combo isn't anywhere close to Maven (despite the XML hate). Libraries, communities, tools, frameworks of .NET ecosystem is still behind Java. Unfortunately langu…

Can you/someone give a quick rundown of why maven is really so much better than everything else?

Maven manage your module/projects from building, dependency management, generating project website (if you want to), deals with packaging, and deployment (if you want to), and many more (via plugins).

Maven is essentially NuGet+MSBuild or Ant+Ivy or Bundler+Gem+Rake without having to manage build tasks manually.

Those tasks are: 1. Compile code 2. Compile test code 3. Run unit-test 4. Run integration-test (separately from unit-test) 5. Setup paths for running unit-test (say you want to use different config/resource files for your unit-test) 6. Package your artifacts _without_ the unit-test artifacts

Maven has these built-in and in a non-disruptive manner. Don't have unit-tests? Maven won't run anything for you.

You have unit-tests source code and assets that you don't want to be included in your final build? Maven will handle that out-of-the-box-no-config needed.

While people might prefer to use "one tool that does its jobs beautifully/correctly", the reality is that you need at least 2 things to build the project: tool to manage your dependency and tool to build+package your project.

Re: MSBuild is going cross-platform with .NET Core

#102

Earlier quoted context omitted.

I really hated the language you use to describe build tasks. It is a very frustrating mix of declarative and imperative syntax. And of course, who wouldn't want to write code in XML?! (XML, the markup language, the one we use for marking up information like documents and records.) I was doing fairly complicated tasks with it years ago, and it's just one of those technologies that feels like it is fighting you at ever…

I am starting to notice a few (mostly cross-platform) projects writing sln/vcproj files using CMake now, so that might be an alternative.

cmake is certainly worth looking at. Doesn't take much to get up and running with it, it's pretty straightforward to use once you're set up, it takes out-of-source builds seriously, and it's got fair support for adding custom build tools (something you'll have a devil of a time getting working nicely in Visual Studio). Reasonable ecosystem as well, with a good supply of online examples and drop-in helper scripts for locating common libraries. (Compare and contrast to, e.g., MSBuild, boost jam, or JamPlus - all of which, even MSBuild, might as well by comparison have about 0 users each.)

Not to say that it isn't awful in many respects, though. It often feels as if it has been designed by 3 people, none of whom talk to one another, and all of whom have different ideas about how things should work. For every time there's some easy setting that nicely handles every platform for you there's another where you have to carefully distinguish between VC++/gcc/clang/etc. and add compiler-specific flags to some random string. And the scripting "language" is unhinged.

Still - compared to a normal project that targets N platforms, where you might well have to deal with N build systems, all appalling, if you use cmake, you'll only have to deal with one.

Re: MSBuild is going cross-platform with .NET Core

#103
post #46

Earlier quoted context omitted.

I used to work at a mostly-Microsoft shop and I cannot fathom why anyone would want to deal with MSBuild for other platforms. There are so many better alternatives. And as bad as MSBuild is for building .NET stuff, at least it's the right tool for that job. Trying to shoehorn it into some other stack entirely, which you know is just going to cause even more pain? No. Just no.

What's even worse is that I recently jumped into asp.net 5 and tripped over three build systems and a pile of cack just trying to get it off the ground. Now msbuild as well!?! Also its not even the right tool to build .net stuff. Add the shoddy dependency resolution steps plus the shitty performance of NTFS on lots of small files (MFT contention) we have to wait 8 minutes for a build. I wrote my own system in powersh…

wtf are you talking about? 3 build systems for using aspnet 5?

Are you fucking blaming .NET for shit like gulp and bower?

Re: MSBuild is going cross-platform with .NET Core

#104
post #43

Earlier quoted context omitted.

.Net has F# though, which I adore to no end. Can even avoid MSBuild with FAKE.

But then FAKE is just like MAKE which is just like MSBuild or ANT. IMHO FAKE syntax is not for me. .NET has F#, nice. JVM has Scala, JRuby, Clojure, etc. But that's a matter of taste/opinions.

And Frege. Much closer to F# than Scala / JRuby / Clojure.

Re: MSBuild is going cross-platform with .NET Core

#105
post #43

Earlier quoted context omitted.

> Will hard-core Linux users who used Java migrate when it makes sense? Probably only for mobile/desktop app but less likely for back-end/webservice/infrastructure stuff. Take MSBuild. This is pretty much Ant. Sure, there's NuGet but Ant+Ivy or MSBuild+NuGet combo isn't anywhere close to Maven (despite the XML hate). Libraries, communities, tools, frameworks of .NET ecosystem is still behind Java. Unfortunately langu…

.Net has F# though, which I adore to no end. Can even avoid MSBuild with FAKE.

And there's Cake for C# peeps - http://cakebuild.net

Re: MSBuild is going cross-platform with .NET Core

#106
post #105
post #43

Earlier quoted context omitted.

.Net has F# though, which I adore to no end. Can even avoid MSBuild with FAKE.

And there's Cake for C# peeps - http://cakebuild.net

Oh, God, thank you! I've been hunting and hunting for something to replace CruiseControl. I had no idea this existed. Is there an easy way to turn this into a CI?

Re: MSBuild is going cross-platform with .NET Core

#107

I know MSBuild gets a lot of hate but this is still great news. The end goal of having a .Net project be compile-able on Windows, Linux and Mac is going to be awesome. I'm curious, when everything is finally done, what the adoption rates will be like. Will hard-core Linux users who used Java migrate when it makes sense? Will they avoid it because "M$"? All good stuff.

> The end goal of having a .Net project be compile-able on Windows, Linux and Mac is going to be awesome.

Except msbuild can't easily support builds across different version of .NET on the same platform. I hate digging into its needlessly archaic build files.

Re: MSBuild is going cross-platform with .NET Core

#108
post #66

Earlier quoted context omitted.

It depends what you're doing. If you're making libraries, console applications or doing modern websites it's pretty easy to get your build working without Visual Studio. One - ELEPHANT SIZE - problem is that for some reason Microsoft only ship the Windows SDKs as part of Visual Studio. Meaning that you'll need to install the IDE at least once to get a build running (you can copy the SDKs around after that). Microsoft…

FWIW, you can install MSBuild without Visual Studio. It's part of the Windows SDK. If your target system is not supported, you have to run it on a supported system and choose the "Download for installation on a separate computer" option. Then copy the resulting msi and cab files to the server and run them. See http://stackoverflow.com/questions/12944502/build-asp-net-4-... However, after I did this, I had to find bui…

This works fine until you have to build a project with a 3rd party commercial library requiring licenses (.licx files). I just spent a week trying to put together a vagrant vm to build such a project finally giving up and adding visual studio to its provisioning script.

Re: MSBuild is going cross-platform with .NET Core

#109
post #30

Earlier quoted context omitted.

Indeed. And they cannot play the "but Java is OSS" card anymore as Oracle has made it pretty clear that Java's APIs are proprietary and that you will be sued if you do anything not authorised by them (which effectively removes the 'open' in "open source software"). Say what you will about the Android Java situation, but it doesn't exactly scream "this is open and free software."

I read somewhere that Microsoft's structured the patents/licenses in the .NET ecosystem in such a way as to make that kind of lawsuit unlikely. Can anyone comment if that is true?

Not true, at least not for the CLR and the framework itself.

The crux of the Oracle v Google suit is basically, "It's Java, but it's not Java Java."

If you take a look at the MS patent promise, the way it's authored specifically allows for the very same kind of suit.

https://github.com/dotnet/corefx/blob/master/PATENTS.TXT

Re: MSBuild is going cross-platform with .NET Core

#110
post #23

Earlier quoted context omitted.

> PS - I have done a lot of .Net development, but rarely did anything beyond the basics with MSBuild directly (mostly via Visual Studio, or took the pre-generated command line and stuck in a script). This is an excellent reason to avoid MSBuild. IDE lockin is a nightmare. Might be unavoidable for Visual Studio, though.

It depends what you're doing. If you're making libraries, console applications or doing modern websites it's pretty easy to get your build working without Visual Studio. One - ELEPHANT SIZE - problem is that for some reason Microsoft only ship the Windows SDKs as part of Visual Studio. Meaning that you'll need to install the IDE at least once to get a build running (you can copy the SDKs around after that). Microsoft…

The SDK has been shipped separately for ages.
Post reply on HN