This project has moved. For the latest updates, please go here.

KatanaEngine fails when using F#-startup

May 23, 2013 at 11:41 AM
Edited May 23, 2013 at 11:43 AM
Microsoft.Owin.Hosting.WebApplication.Start<MyClass>(url)

works perfectly on a C#-class:
    public class MyClass
    {
        public void Configuration(IAppBuilder app)
        {
            app.MapHubs();
        }
    }
but fails if I try to use it with F#-class:
type MyClass() =
    member x.Configuration(app:Owin.IAppBuilder) = 
        Owin.OwinExtensions.MapHubs()
It fails in KatanaEngine.cs method ResolveApp(StartContext context) in line:
throw new EntryPointNotFoundException(Resources.Exception_MissingApplicationEntryPoint);


(Other than that, F#-hosting is working fine, so workaround is to make dummy-C#-project with only this one class...)
Coordinator
May 24, 2013 at 7:30 PM
I tried this on the latest bits and it worked.
http://www.myget.org/f/Katana

The only thing I had to change in my app was to make sure the return type was void:
type MyClass() =
member x.Configuration(app:Owin.IAppBuilder) =
    let y = app.ToString()
    ()
And if it doesn't work for you, at least the error messages should be more helpful now.
May 28, 2013 at 9:53 PM
Thanks!