It all works in Visual Studio. Just create an ASP.NET/C# web site, then add an F# project, and in the F# project settings direct the compiler output to the Bin of the web site.

By on 5/30/2009 12:03 AM ()

will i need to fiddle with asp.net code to get it all working. or everything is taken care by F#

By on 1/3/2014 9:51 AM ()

I am delighted to get a reply to this four years after I posted! I can still remember posting it. :)

I don't have Visual Studio in front of me as I'm on holiday, but what I posted is still correct. I have since deployed a much larger asp.net mvc project to Azure with a mix of C# and F#.

Just set the asp.net/c# project as the main project in the solution (I can't recall exactly what the setting is, but it's a right-click from the project in the solution explorer) and then in the Properties for the F# project direct the compiler output to the bin of the C# project.

You can't reference the f# project directly from asp.net/c#. You need to reference the DLL's (in the bin folder) from the C# and import them with web.config of the ASP.NET.

Thanks again, and good luck with it! I personally found it very worthwhile to be doing much of the solution in F#.

By on 1/3/2014 5:34 PM ()

>> You can't reference the f# project directly from asp.net/c#.

In VS2013 you can reference an F# project from a C# project in the same solution. Use the normal sequence from the C# project, ie. right-click References -> Add Reference, and then in the 'Project' tab check the F# project.

This works for local testing (with F5) and I suspect would also manage deployment for you.

By on 3/6/2014 3:21 PM ()

so any asp.net hosting will do or something specific is required for F#. are there any memory requirements for F#

By on 1/3/2014 9:50 AM ()

so any asp.net hosting will do or something specific is required for F#. are there any memory requirements for F#

It's all IL in the end, so long as you are deploying assemblies. Just make sure to include FSharp.Core.dll, as some machines may not have the F# tools installed.

Also, you may find that the F# MVC 5 template works with most hosts: [link:visualstudiogallery.msdn.microsoft.com] This template gives you C#-based Razor views in an all F# project. We are currently working out the Web/Azure Deploy kinks. Otherwise, this template even runs on Azure (using Git deployment, for example).

By on 1/14/2014 8:20 PM ()

so any asp.net hosting will do or something specific is required for F#. are there any memory requirements for F#

Nope! The small project I described in the post was deployed to a standard ASP.NET commercial host and my current project is deployed to Azure. Deploy your asp.net/C# as the root of the web site, and manually deploy the F# DLL's to the Bin. I was not able to get automatic VS deployment working in VS2010 or 2012, even for a pure asp.net/C# project, and I used ftp to build the web site structure on the host. You deploy the .aspx and C# files as normal, and manually copy the F# dll's to the Bin on the host. It's a bit of a pain at first, but once you've got it working it is quite easy to update it.

By on 1/3/2014 5:44 PM ()
IntelliFactory Offices Copyright (c) 2011-2012 IntelliFactory. All rights reserved.
Home | Products | Consulting | Trainings | Blogs | Jobs | Contact Us | Terms of Use | Privacy Policy | Cookie Policy
Built with WebSharper