Hacker News new | comments | show | ask | jobs | submit login
Running ASP.NET vNext on OS X and Linux (graemechristie.github.io)
143 points by chillitom on May 26, 2014 | hide | past | web | favorite | 62 comments

I was reading that with a big smile on my face. They're doing a lot of stuff I've been wanting for a while, especially the web server agnosticism. My new LAMP stack: Linux, ASP.NET, Mono, PostgreSQL.

"My new LAMP stack: Linux, ASP.NET, Mono, PostgreSQL."

Good one :)

It made me laugh, too.


Followed Graeme's instructions and after about 30 mins spent building the latest Mono I was quickly able to get ASP.vNext up and running on OSX.

Found one small mistake in the instructions, the switch --feed should be --source in the kpm restore step.

do you have zsh installed ? when i'm trying to install kvm i got error:

   .../.kre/kvm/kvm.sh:145: parse error near `]]'

Haven't tried zsh but worked fine with bash. GNU bash, version 3.2.51(1)-release (x86_64-apple-darwin13)

Microsoft sponsoring a cross-platform application environment does not make much sense. Why would they do something that is bad for them in the long run? Why would it make sense for them to release it under an open-source license?

Can anyone imagine a compelling business case for this? I am not used to corporations being overly generous.

Cross-compatibility makes a lot of sense of they perceive a lot of future risk to their value proposition that one technology or product will sell another one. If they don't believe Windows Server will be a compelling enough technology to push adoption of .NET, then why risk the decade of development on it by tying it around the neck of IIS? I see it as an admission that the various product offerings need to float on their own merits, not just because 'its the option that runs on Windows'. There's enough alternatives now to make that kind of assumption a relic of the '90s and 00's.

+1 Best answer so far.

They are just making a bet that tight coupling to a singular platform does not give them the agility they want for the future. This may also be a trial balloon. If this goes well you may see other things in the Microsoft stack make similar changes.

Except that this isn't any different from the other times they supported other platforms when they didn't hold a monopoly in that specific area. This isn't a new strategy / trial balloon; this is a tried and tested technique for gaining market dominance (and it's not just Microsoft who play this game; most of the tech giants do - even Google).

Yes, but in this case, they are embracing and extending - and open sourcing - their own platform, ASP.NET. We are still missing something.

They may attract some Java developers, but I don't think it has much appeal outside their own ecosystem.

Just because they haven't yet reached the 'extinguish' stage of their strategy (and possibly never will), it doesn't mean that isn't the intended outcome. And going by their past behaviour; history would suggest that is their eventual end goal.

As for whether ASP.NET on Linux will ever attract many new developers; I must admit that I'm inclined to agree with you.

How can you monopolize something that runs on Linux and is forkable?

Quite easily, actually. If the majority of Mono / .NET developers are in house MS developers, then Microsoft still have all practical control over the project (just because something is open source, it doesn't mean people will develop for it nor fork it). Plus Mono not all of .NET is open source; such as the DRM extensions for Silverlight (there aren't even closed binary Mono libraries for that).

But that wasn't my point, I was commenting about how Microsoft support other platforms and standards to gain a foothold in that specific market; then introduce incompatibilities to lock people into their technology (https://en.wikipedia.org/wiki/Embrace,_extend_and_extinguish). It's a well used strategy (and not just by MS). In fact, I almost sympathise with it's usage as it makes a lot of business sense - even if it does totally suck from a user perspective.

Also, why down vote me; then ask the question? Doesn't that seem a somewhat backwards approach to discussion and peer moderation?

80% and more of the internet does not run Microsoft server products or their technologies.

* sell more visual studio

* sell more sql server

* reach developers who wouldn't consider ms technology at all

* accelerate the nuget "marketplace" of open source 3rd psrty libraries, which could benefit other platforms almost for free (winphone, xbox, winrt, win8)

* finally, there's a good chance a lot of the stuff will "just work(tm)" well enough only on windows. Suddenly your planned linux deployment is thrown out and replaced with windows to make those small annoyances just go away

* Developers developers developers

Actually, it's all about cloud. I think they want more Azure customers in the long run.

Exactly this. It's what they've always done: support other platforms right up until they hold a sizeable market share; then monopolise that technology on their own platform.

Since it's more trouble porting code to a new language than it is porting web servers to a new host OS, it makes total sense to encourage more developers towards .NET via open source platforms.

"It's what they've always done: support other platforms right up until they hold a sizeable market share; then monopolise that technology on their own platform."

I'm curious: what are these "other platforms" that Microsoft have briefly supported?

Internet Explorer on Macs back in the days of the IE / Navigator wars. Lotus document formats back before MS Office was the de facto standard.

And even just talking about .NET, that was only created to compete with Java after Sun to Microsoft to court over MS's own Java implementation (though granted it's since evolved into something much more). .NET was originally sold as but MS quickly lost interest in pushing it on non-Windows platforms. And then came Silverlight to compete with Flash; and the cross platform hopes for that followed a similar fate once it became obvious that Flash was no longer a competition.

But as I said in another comment, it's a common enough strategy - hardly something unique to Microsoft. It even has it's own coined term: Embrace, extend and extinguish https://en.wikipedia.org/wiki/Embrace,_extend_and_extinguish

Windows Media Player for Solaris during media wars. When they ended, support was dropped.

Internet Explorer for UNIX (Solaris, HPUX) during browser wars. When they ended, support was dropped.

Does leopard change its spots? If they are successful with ASP.NET as The Web Framework (not much realistic, I know), expect them to drop support for anything but Windows.

Windows NT did have "subsystems" for POSIX and OS/2 along with Win32 back in the day.

Foot-in-the-door? Having Linux as a deploy target allows a MS-heavy group to keep using their tools. The strategy of pretending nothing else exists won't work, so working well together must be done.

It seems that Linux vs Windows is often a fundamental question, so Microsoft is going to rule out all of their products if they can't say yes. Mono is plausible; I've been using it in production for years and processed billions of transactions with it. Microsoft adding more official help reassures the people that might otherwise dismiss Mono.

Microsoft still has some good product value. SQL Server is pretty fantastic as far as capabilities and getting them to work goes. Unfortunately their decision to go all Oracle on their licensing means a lot of people are going to be looking elsewhere. (Not adding "basic" things like JSON operators is also a bit embarrassing.) Office and Visual Studio are unrivaled.

Bad for them? How so.

Windows can sell itself on its own merits, and has been for ages. Meanwhile, dev tools is a billion dollar a year revenue division, and yet it could be even bigger. C# is one of the best languages around at present, but a lot of the "cool kids" don't use it because it's too tied to the Microsoft stack.

I typed a bunch of stuff here already but I just deleted it, instead I'm going to go with an analogy.

If devs are cats then doing things like porting the .net toolchain to linux/osx is like leaving cat food outside. And that's precisely how you turn feral cats into house cats. Cats will go where the food is. And they'll keep coming back to it night after night.

If you treat devs right, and give them the tools they want on the platforms they want they will become encouraged to turn to you for support. They will buy your IDE and other dev tools. They may even buy your OS and database tools. Additionally, by increasing the adoption rate of the .net toolchain it makes it that much easier for devs to write for winphone, windows, xbox one, etc. If you encourage devs to use C# for android/iOS development then the cost/benefit prospect for shipping a winphone version of an app changes dramatically vs. using raw java/obj-C.

It's win/win for devs and for MS.

The whole point is to make ASP.NET vNext attractive to those cats. It means to be attractive next to all the other choices of cat food available to them outside Microsoft's house.

ASP.NET and C# may be incredibly amazing, best-thing-since-sliced-bread, when compared to what exists for Windows developers, but, for most developers who live outside the Microsoft ecosystem, it deserves no more than a "meh". There are tons of languages in the C# space, and even more tons of modern web frameworks to choose from. Why would anyone pick ASP.NET when they have so many other toys?

Azure. That's where they intend to make money.

They always made the specs of .Net open, which means anyone can implement it.

With the rise of other tools, they have a foot in the Linux/MAC development, where else, they wouldn't have anything outside of Windows. Their coöperation with Mono is great, helping a partner further while letting the .Net thrive :)

BTW. Their strong argument is Visual Studio, which is still (personal opinion), 100% better then any other tool i ever tried - although i must admit, Sublime Text feels great, but it isn't integrated like Visual Studio

"Sublime Text feels great, but it isn't integrated like Visual Studio"

Notepad with plug-ins vs IDE. I mean ReSharper alone beats everything except for maybe IntelliJ IDEA.

Because they are making a lot of money of Windows Azure. And they plan to make even more.

Make it work cross-platform, but offer better support (and more importantly support contracts) on Windows. This positions Microsoft as a credible player in the modern software world, but still positions Windows as the premiere environment for running Microsoft-stack applications.

The answer? Azure. It runs linux.

Tools. Azure. Relevancy.

Microsoft missed the whole generation of programmers when the focus shifted from the desktop to the web. Without programmers MS is dead in the water. This is their play to stay relevant.

>Can anyone imagine a compelling business case for this?

Sure - make Windows the premiere platform for (ASP.)NET, which is rather a given (even if not intentionally, which it most certainly would be, unintentionally the practical implementation details mean that things will just naturally work better with Windows). Get teams that would have adopted alternatives to adopt .NET under the premise that it is cross-platform and goodness now. Make a really good case for them to switch to Windows down the line.

That isn't a new tactic, and is done across all industries by many businesses.

Despite the apparent influx of Microosft-platform devs on HN lately, this is not going to gain traction -- it is, in essence, a gimmick, and simply provides a talking point to avoid changing platforms.

> this is not going to gain traction -- it is, in essence, a gimmick

What makes you think that? Microsoft makes things easy for developers.

They've already enabled multiple generations of so-called "Blub developers" to service major portions of the vast enterprise landscape. If you think blub devs are stupid, then you must believe that Microsoft offers a really easy development environment. So why would that be unwanted or un-useful?

Will you argue that nobody wants to get locked into Microsoft's ecosystem or that nobody likes them based on whatever politics? I don't think there is any lock-in here (since it's running on Linux) and I don't think people are that principled when it comes to tools (based on the observation that so many `nix devs have locked themselves into the comfy and easy to use Apple ecosystem).

I find a lot of these Wordpress blogs around lately, all with the same theme and, even more curious, all with a lot of comments though they rarely have more than a few articles.

It makes me suspicious of the source and purpose of them.

Maybe they realized that Windows is sinking[1] and if they don't untangle the company from it, the entire Microsoft will sink with it.

[1] Slowly, but inexorably. Anyway, this is server side. The only similar act on the client side I can rmember is making Office run on Android.



Microsoft's Windows Server division is the second largest business unit making up over 20% of its total value. It is also one of the fastest growing divisions of Microsoft. During Q2 FY14, revenue from the commercial segment, which includes servers, commercial office licensing and cloud platform, grew 10% to $12.66 billion driven by higher SQL server sales and adoption of the cloud based Azure platform. Many customers of Microsoft depend on SQL servers for mission critical and business intelligence needs, specifically in the big data analytics domain. As a result, Microsoft's SQL server revenue grew by 11%, outpacing the server market. Additionally, its Azure cloud offering clocked in triple digit growth in revenues. We're encouraged by the continual growth that this division posted, and it is becoming an important driver for Microsoft's value.

height != trajectory

True, but the words "up" "growth" and "growing" do.

IIS, MS SQL Server, Exchange, Azure, Sharepoint... None of those are Windows.

Up to now, Microsoft is using them to force people to buy Windows, at the expense of those products own market fit. Now, they are just removing IIS from that list.

Maybe, but where is their revenue model? They can't monetize it directly like they do Windows after open sourcing it and, if it succeeds, it'll end up taking market share away from Windows with nothing in return. We are still missing something.

MS has all the components, but still lot's of developers view the ms stack as boring corporate stuff. Azure has the potential to generate more revenue than the windows line in a few years. For that to happen they need a lot of developers on Azure, and making visual studio + .net super awesome seems like a good way to do it.

Awesome. I started looking at vNext last week, and stopped short of trying it then due to lack of a Windows machine (which I've set up in the meantime). This will make it a lot easier to experiment with.

> This is your ASP.NET vNext project file .. and not an angle bracket to be seen !

And no comments allowed, either! Changing formats to be hip is fun!

It's a correct observation. Why switch from an extensible mark-up format to a non-extensible data format?

Maybe it is possible to put comments in .csproj files, but that isn't exactly a common use case.

It's definitely not a common use case, because VS reformats the csproj files whenever it modifies them. Basically, when you make a change within VS that affects the csproj file, the entire file is pulled in through an XML parser into a DOM representation, modified in-memory, then serialized back out to XML. Frankly, I'm surprised comments are retained at all.

XML comments are part of the DOM and are retained, usually. And Visual Studio has become quite good at not clobbering things it does not modify itself. The project files are still normal MSBuild projects, so editing them by hand to add targets of other customisations isn't exactly uncommon.

Except the apparent point of using JSON is to make it more human friendly. Otherwise, changing the format is quite pointless and not much of a feature to talk about.

Why exactly would I want this? What benefits does it provide? How is developing in a proprietary ecosystem...even if they do release it "for Linux" any better than developing in something like Python or Ruby?

Serious question. If there are real benefits I would love to know about them.

I really don't understand why this is being downvoted into oblivion. It's a valid question.

One answer is simply that C# is an awesome language. It is roughly as expressive as Ruby and Python, yet it is usually faster and it has much more powerful tooling (MonoDevelop, Visual Studio), partly enabled by its static typing (which is mostly up to taste, I suspect).

Also, .NET is very batteries-included and the open source ecosystem is decent (decent, not good).

As an example, I currently run a team that develops a C# backend. We dev on Macs, Linuxes and Windowses, we deploy to Docker containers on Linux hosts, we use Postgres for data and the open source ServiceStack for API bindings. When e.g. one of our Mac devs does a deploy, not a single byte of Microsoft code is touched.

I'm not saying you should do this too. But it's a valid option, and you can perfectly well do C# without depending on Microsoft tooling or paying them anything. Of course the future is still very much determined by MS, so we're betting that MS doesn't kill Mono-for-Linux once they buy Xamarin. But that's not very different from Oracle and Java, really. MS made stronger and fairer community promises, if that's something.

It's too bad you were downvoted, this is a good question.

First, I'd question why you'd still think of it as a proprietary ecosystem. It's an open source (Apache 2), cross platform framework. It's not even directly released by Microsoft, it's released under MS Open Tech, which is a foundation just focused on open source development. And it's not just "throw it over the wall open source", it's an open source project that's set up for and encouraging contributions.

Even the compiler it runs on is open source, also under Apache 2 (http://roslyn.codeplex.com/license).

As for the "why" bit, here are some reasons:

- If you're developing on Windows, Visual Studio is a pretty good web editor. That includes Visual Express for Web (free) with the Web Essentials extension (also free, works on Express). You can develop on Windows (inc. a VM) and deploy anywhere.

- C# really is a pretty nice language. It's static and compiled, but has support for some dynamic features. Linq is really useful. Generics work well. The language spec is under an open standard. Everyone has their own preferences on languages, but it's pretty nice.

- As a web framework running compiled assemblies, it can run pretty fast.

- If you're interoperating with .NET and/or Mono, of course this is pretty useful.

- C# and .NET are actually really good for cross-platform development (e.g. Xamarin hits ios, android, wp, maybe even tizen soon). For example, C# runs better on my Mac than Ruby does on my Windows machines.

- If you find that ASP.NET MVC 6 (the version vNext will run, including MVC / Web API / SignalR) works for you but you don't like Windows, you could dev on Mac / *nix and publish to Azure / Mono / whatever.

Languages, libraries, performance, ...

So, the question is unanswered but someone took the time to express their displeasure that it was asked...

Very telling. And I think I now have my answer.

There's a few code samples here:


For some reason I can't get the web ones to work (this is on OSX), I see:

System.DllNotFoundException: httpapi.dll

This would be great news, except I trust Mono even less than I trust IIS. At least IIS is fast, even if it breaks in bizarre and opaque ways.

Disappointing article. A console application isn't ASP.NET.


Good thing it says ASP.NET vNext then.

Applications are open for YC Summer 2018

Guidelines | FAQ | Support | API | Security | Lists | Bookmarklet | Legal | Apply to YC | Contact