12 ms·
MSBuild is going cross-platform with .NET Core
- gnoway 11y agoThe talk about first-class support for packages and dependency comprehension is interesting. At a minimum, having a native NuGet task - or have it be default behavior of the MSBuild task - vs. having to run restore/install via Exec would be very nice. MSBuild is not a great tool, but it's not awful either. I would not be depressed or angry at having to use it to build something on Linux.
- BinaryIdiot 11y agoI 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.
- Touche 11y ago.NET was already somewhat popular on Linux for GTK apps. I don't know if you're going to see adoption for web servers unless it can be competitive with Java in performance, which I don't think Mono has traditionally been.
- deet 11y agoSeconded. Performance is the main thing holding me back. I'm very excited about C# and other .NET languages for server applications, and would like to make it my primary server side environment, but am waiting for three things: 1) A production ready compiler and runtime on Linux (coming) 2) Tooling to support the new .NET project structures and dependency management (coming, it seems) 3) A production ready server solution with reasonable performance. On Mono, .NET Linux server apps consistently score near the bottom of benchmarks, essentially ruling it out. (Who knows? It seems too early to know whether this will happen.)
- pbz 11y agoThere has been work on performance and more to come (source: ASP.NET Community Standup podcasts). The stated goal is to be in the ballpark of the top performers. You can follow the progress here: https://github.com/aspnet/benchmarks https://github.com/aspnet/benchmarks Just keep in mind that the work just started (and it was recently put on hold to get the Linux version - beta 7 - out the door).
- deet 11y agoVery happy to see a focus on performance on the roadmap. I've actually seen that benchmark page, but all the results it lists are for the Web Server running on Windows (perfsvr), where Linux is only used for load generation. Any idea if the results are similar with the server running on the Linux machine (perfsvr2)?
- jongalloway2 11y agoThat's a good question to ask now that beta 7 is out. I'll try to remember to bring that up at the next Community Standup.
- jongalloway2 11y agoUpdates have slowed on it (I haven't had the heart to nag them because they've been so busy with beta 7) but they're continuing to make good progress on it, e.g. https://twitter.com/DamianEdwards/status/632000189818007552 https://twitter.com/DamianEdwards/status/632000189818007552 "Kestrel hit 151k RPS just now for plaintext test with pipelining (depth 16). Lots of known things to fix still, big gains to come #aspnet" "have a fix in the works that'll give us another 5-10% & a list of other things to attack after that. Fun stuff :)"
- deleted 11y ago[deleted]
- kenbellows 11y agoThe Mono framework[1] has been pretty popular in some circles for years now, so I imagine a decent amount of adoption can be expected once .Net Core proves stable. 1: http://www.mono-project.com/ http://www.mono-project.com/
- tracker1 11y agoFor that matter, Mono has been sharing the parts of the new .Net Core as they come out and make sense to do so...
- swozey 11y agoIt will be very nice to be able to do CI/compilation on extremely cheap and fast (to spin up) linux slaves as opposed to requiring an expensive (license, hardware) and slow (miserably slow ec2 boots) Windows servers.
- nathanaldensr 11y agoGood Lord, yes. It takes forever for my TeamCity build agent AMIs to spin up and actually connect to the TeamCity server. It would be awesome to replace that bulky Windows build agent with a Linux one.
- swozey 11y agoI gave up on activating windows agents programatically, I keep one powerful windows build server running, it spins down at night after regression testing, then back on during the day when employees come into the office. The pocketbook definitely feels it, though.
- fiatjaf 11y agoAnyone who does not like MS because of the $ cannot at the same time like Java.
- Someone1234 11y agoIndeed. 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."
- deegles 11y agoI 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?
- jongalloway2 11y agoThere are patent pledges and promises not to assert patents: https://msdn.microsoft.com/en-us/openspecifications https://msdn.microsoft.com/en-us/openspecifications Portions of .NET are under ECMA and ISO standards: https://en.wikipedia.org/wiki/Common_Language_Infrastructure#Standardization_and_licensing https://en.wikipedia.org/wiki/Common_Language_Infrastructure... I think the most important part is that the new cross-platform .NET core framework, CLR, and compiler (Roslyn) are under permissive open source licenses (MIT for fx and clr, Apache 2 for Roslyn). You can see licenses and patent pledges here: https://github.com/dotnet/ https://github.com/dotnet/ Disclaimers: 1. Microsoft employee until they notice I'm hanging out on hacker news instead of replying to e-mails and "fix the glitch". 2. Not that smart and definitely not a lawyer.
- fimoreth 11y ago> 1. Microsoft employee until they notice I'm hanging out on hacker news instead of replying to e-mails and "fix the glitch". Shh, they might find us.
- edwinnathaniel 11y ago> 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 language features and syntatic sugar alone probably not enough to sway these users. Besides, Java and C# are very similar, technically there's less reward in learning a very similar language.
- manigandham 11y agoCan you/someone give a quick rundown of why maven is really so much better than everything else?
- edwinnathaniel 11y agoMaven 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.
- balefrost 11y agoMaven love is far from universal: http://kent.spillner.org/blog/work/2009/11/14/java-build-tools.html http://kent.spillner.org/blog/work/2009/11/14/java-build-too...
- tomjen3 11y ago1 year ago, yes. C# is awesome as a language but I don't see a reason to switch to .net when the JVM has Kotlin, which is nicer than C#, but still super lightweight and thoroughly pragmatic.
- tychuz 11y agoMy reason would be: I can choose from a ton of C# positions, meanwhile Kotlin would have what? In my and neigbour countries I can find exactly zero Kotlin job offers.
- tomjen3 11y agoThat is true. I assumed I would eventually go into business for myself and see no reason to use C# - besides Kotlin is very young, there is still plenty of time to get in on the ground floor so to speak.
- CmonDev 11y agoCool! How would you build an app for iOS and WinPhone using Kotlin?
- wtetzner 11y agoDon't know about Windows Phone, but for iOS you could use RoboVM. http://robovm.com/ http://robovm.com/
- tomjen3 11y agoThe same way I do in any other language: I don't.
- cptnbob 11y agoHTML! And you get to do it once for both...
- yareally 11y agoFor Windows at least, there's IKVM: http://www.ikvm.net/ http://www.ikvm.net/
- ossreality 11y ago>The end goal of having a .Net project be compile-able on Windows, Linux and Mac is going to be awesome This is already possible without the bullshit msbuild.
- naasking 11y ago> 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.
- lmm 11y agoIt's a whole different ecosystem - it's not like Scala where I can sling in one class on an existing Java codebase. .net isn't just its own VM, it's its own IDE, its own build tool, its own packaging model.... For little standalone pieces - the kind that people write in D or OCaml because they want to - I can see .net being used on linux. But I don't see anyone migrating an enterprise Java codebase - it's just too much effort for too little gain.
- rbanffy 11y agoDoes building .net projects require MSBuild?
- godzilla82 11y agoDo you have any practical experience of using MSBuild? If you have ever worked on MSBuild and other build tools (e.g. ant, maven, even make for that matter), you would have noticed how difficult it is to write or extend simple build tasks in msbuild. Have you ever tried to use MSBuild to build anything on a machine that doesnt have visual studio installed? If you use any other ide, the separation of IDE and the compiler is very clear. Try figuring out the build parameters that Visual studio uses to compile your code.
- akshayB 11y agoThis is good news but little bit too late. Microsoft strategy of sticking with windows to slow down Linux and Mac back fired . If they opened up .Net few years back cross platform app development landscape would have been totally different today.
- camdenre 11y agoI don't know why you think it is too late? Do you think people aren't going to embrace cross-platform .NET?
- vblord 11y agoProbably because it just has to do with something related to microsoft. For some reason, people just hate Microsoft. Even though they produce some of the best development tools... people still hate them. In the words of taylor swift, "And the haters gonna hate, hate, hate, hate, hate"
- akshayB 11y agoIf this was done in 2005, I think it would have been a different story
- UK-AL 11y agoWhat do you mean totally different? Outside of silicon valley and start up world .net and Java dominate.
- wsc981 11y agoI'm not sure Microsoft came too late to the party. Perhaps MSBuild is a bit crappy (I don't know, never used it), but I can imagine Roslyn becoming more useful now on other platforms since it's open sourced. It'll be great that one can be sure the runtime behaves the same on all platforms Roslyn will run on. And it'll also be nice if new runtime features will be available on every platform at (more or less) the same time. I think Roslyn could have a nice future ahead. Personally speaking, I find writing C# is much more enjoyable as writing Java. And who knows, maybe someone will build a decent MSBuild replacement. Or perhaps the Xamarin guys already have a nice alternative.
- serve_yay 11y agoHoo boy, MSBuild was always by far my least-favorite part of being a .NET developer. I would like to flippantly say they should just throw it away and replace it, but probably much too late for that.
- Someone1234 11y agoI have no strong opinions for or against MSBuild. What is it that you dislike about it? Or what is it that other tools do that MSBuild fails to do? 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).
- duaneb 11y ago> 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.
- smacktoward 11y agoIf your priority is avoiding IDE lock-in and you have somehow ended up a Microsoft developer, you need to closely re-evaluate your life choices.
- radicalbyte 11y agoIt 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). Microsofties - I know that a lot of dev-div people will be reading - can you shed some light on this situation? What's the reasoning behind not shipping the SDKs separately. I've never had this problem with Java..
- wangii 11y agowhat's the core advantage over make/rake?
- rblatz 11y agoHistorically the project files in C# apps included msbuild configuration. Also a lot of nuget packages include a.targets file, which also contains msbuild configuration. For compatibility reasons if you are using the .net ecosystem you need msbuild.
- aaronbrethorst 11y agoMSBuild has a long history: It started out in 2005 as a part of the .NET Framework itself, and became an integral component of Visual Studio over time. Most recently, Microsoft’s build engine found a new home in the Tools for Software Engineers (TSE) team in Microsoft’s Cloud and Enterprise group. What's funny, though, is that the MSBuild team was originally part of Visual Studio Core, which also owned devenv.exe, the Visual Studio SDK, Projects and Solutions, the editor, and—perversely—Visual SourceSafe.
- dblock 11y agoWhile at Microsoft in early 2000s when MsBuild was first seen (I helped with the initial integration into CoreXT) I attempted to find the person responsible for <Output TaskParameter="Y" PropertyName="X" /> to scream at them. Unfortunately the repo doesn't have pre-open-source history :(
- cptnbob 11y agoNow I can hate every moment of its existence on more than one platform! Having dealt with it for years, it's unadulterated pain and bad performance and nothing else.
- CydeWeys 11y agoI 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.
- plorkyeran 11y agoI doubt that anyone would choose it for other stacks, but this means that you don't need a separate build system for building your existing .NET project on non-Windows.
- CydeWeys 11y agoAre there really that many people building .NET projects on non-Windows systems? It's been my experience that companies that are using .NET are pretty much full Windows everywhere.
- Locke1689 11y agoRoslyn needs cross-platform MSBuild to build itself for every platform (without Mono). Same with corefx. So even if you're currently using or thinking about using .NET xplat and don't have any plans to use MSBuild, this move is necessary for us working on .NET to get xplat builds working.
- code_sterling 11y agoI'll definitely be. I live in the nix terminal, and that's where the tools work best for web development. But the current day job is C# apps. I dream of hacking code legitimately in a nix.
- drfritznunkie 11y agoOne can only hope this effort improves the miserable MSBuild documentation. Exposure to the .Net ecosystem and MSBuild are recently events for me, and I can't say I've had a day where I've not cursed out either the documentation for Azure or MSBuild. Thank god I found a single reference in a single engineering blog post to the very very beta at the time ARM Resource explorer many months ago (resources.azure.com). It was the only way I was able to reverse engineer the ARM provisioning templates since nothing was documented. Now if the people responsible for all this awesome effort in cross platform tools and open sourcing products could go down to the licensing and support divisions and bust some heads, I might be willing to continue working on the platform. But as it is, I've been playing 10 hour Bangalore ping-pong for almost a month now trying to get them to acknowledge the Azure support contract that was paid for a month before that! Ultimately, if Microsoft doesn't fix their baroque and Kafkaesque licensing and support process, all this work is going to be for naught.
- beastway 11y agoWhy would I want to deal with MS on any other platform? I want nothing to do with that company out of principal and I hope we can do a equally harmful shut out of MS in the future, they deserve their own medicine. No, into the trash it goes.
- romanovcode 11y ago>Why would I want to deal with MS on any other platform? Because C# is a great language.
- retrogradeorbit 11y agoSure. But when you are looking cross platform there are much better languages than C#.
- rjbwork 11y agoIMO, not with anything approaching the install base/jobs/tooling/etc. of C#, and you get the ability to practically use F# when appropriate. Also, how many big "enterprise" shops are doing interop between a C-Style language and an ML-style language? Probably not many, and almost certainly more are doing it with C#/F# than anything else.
- rjbwork 11y agoYou can't win if you're not going to reward companies for good behavior.
- retrogradeorbit 11y agoBut on the other hand, how many times are you going to put your hand on the stove and get burnt before you learn?
- BigChiefSmokem 11y agoBecause Microsoft keeps me employed and making money.
- faragon 11y agoIn my opinion, Microsoft should think about making their compilers/linkers make-friendly, e.g providing cross-compilers ("cl.exe", separated compiler and linker).
- clayrsmith 11y agoThis is just a part of MS larger new open source initiative for legacy systems. ASP.net 5+ projects will be using DNX https://github.com/aspnet/Home/wiki/DNX-utility https://github.com/aspnet/Home/wiki/DNX-utility which is already open sourced.