Reputation: 266
I'm interested how I can use a different .NET language (F# for instance) and still target asp.net vNext. One way I can think of is making a F# NuGet package and reference it but this still does not allow you to use F# or any other .net language for all the implementation (I'm not talking about the razor pages here).
I mean it seems that when you do a k run
it simply compiles all the *.cs files using Roslyn and call it a day. No way to change anything or at least I could not find a way.
This means the only other option to target asp.net vnext completely from another .net language (not Roslyn supported meaning not C# or vb.net) is to somehow compile an assembly referencing the asp.net vnext assemblies and run it in IIS? Thus bypassing the k run
or the k web
defined in project.json
?
Upvotes: 7
Views: 660
Reputation: 266
After playing more with the samples and making some tests in iisexpress I can confirm that you can use F# and run an F# based asp.net vnext web app.
I used a simple sample that was just responding from the Startup class in configure with a string. I compiled it and referenced the Microsoft.AspNet.Http assembly from the user kre packages folder. I used AspNet.Loader.dll from the Helios in bin folder and also copied there the f# assembly and it all works well under iisexpress.
Upvotes: 6