First steps with Nancy:
using System;
using Nancy.Hosting.Self;
namespace HelloNancy2
{
class Program
{
static void Main(string[] args)
{
var url = "http://127.0.0.1:5000";
using(var host = new NancyHost(new Uri(url)))
{
host.Start();
Console.WriteLine("Nancy Server listening on {0}", url);
Console.ReadLine();
}
}
}
}
Compile and Run results in:
Unhandled Exception: System.TypeInitializationException: The type initializer for 'Nancy.Bootstrapper.AppDomainAssemblyTypeScanner' threw an exception. ---> System.MissingMethodException: Method not found: 'System.AppDomainSetup System.AppDomain.get_SetupInformation()'.
at Nancy.Bootstrapper.AppDomainAssemblyTypeScanner.
at Nancy.Bootstrapper.AppDomainAssemblyTypeScanner.LoadAssembliesWithNancyReferences()
at Nancy.Bootstrapper.AppDomainAssemblyTypeScanner..cctor()
--- End of inner exception stack trace ---
at Nancy.Bootstrapper.AppDomainAssemblyTypeScanner.TypesOfTType
at Nancy.Bootstrapper.NancyBootstrapperLocator.GetBootstrapperType()
at Nancy.Bootstrapper.NancyBootstrapperLocator.LocateBootstrapper()
at Nancy.Bootstrapper.NancyBootstrapperLocator.get_Bootstrapper()
at Nancy.Hosting.Self.NancyHost..ctor(Uri[] baseUris)
Nancy 1.x does not run on .NET Core you need to use 2.0-clienteastwood to run on Core
@thecodejunkie Any roadmap to merge 2.0-clienteastwood to master?
Most helpful comment
Nancy 1.x does not run on .NET Core you need to use
2.0-clienteastwoodto run on Core