
Running ASP.NET vNext on OS X and Linux - chillitom
http://graemechristie.github.io/graemechristie/blog/2014/05/26/asp-dot-net-vnext-on-osx-and-linux/
======
itsboring
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.

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

Good one :)

~~~
icantthinkofone
It made me laugh, too.

------
chillitom
[https://jabbrlive.blob.core.windows.net/jabbr-
uploads/Screen...](https://jabbrlive.blob.core.windows.net/jabbr-
uploads/Screen_Shot_2014-05-26_at_192506_0a6a.png)

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.

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

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

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

------
rbanffy
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.

~~~
seanmcelroy
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.

~~~
keithwarren
+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.

~~~
laumars
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).

~~~
rbanffy
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.

~~~
laumars
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.

------
chillitom
Also a Linux screenshot: [https://jabbrlive.blob.core.windows.net/jabbr-
uploads/clipbo...](https://jabbrlive.blob.core.windows.net/jabbr-
uploads/clipboard_b875.png)

------
rcarmo
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.

------
MichaelGG
> 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!

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

~~~
DougWebb
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.

~~~
ygra
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.

------
jqm
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.

~~~
skrebbel
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.

------
colinramsay
There's a few code samples here:

[https://github.com/aspnet/Home](https://github.com/aspnet/Home)

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

System.DllNotFoundException: httpapi.dll

------
bkeroack
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.

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

~~~
davidfowl
Here's a web application
[https://github.com/davidfowl/HelloWorldVNext](https://github.com/davidfowl/HelloWorldVNext)

~~~
tphan
Thanks.

