Sponsor: Do you build complex software systems? See how NServiceBus makes it easier to design, build, and manage software systems that use message queues to achieve loose coupling. Get started for free.

Breaking Changes
There’s an upgrade notes page on the Nancy Wiki, which lists some of the breaking changes. Although there aren’t many, and I suspect most of the work for the 2.0 release was for targeting NETStandard. The most glaring breaking change is with routing.Routing
Routing syntax has changed toThis is really significant. In Nancy V1, you specified routes using the following: If you have a large web app with many routes and modules, although a trivial change, this could take some significant time.Get("/", args => "Hello World");
, these can be madeasync
by adding theasync/await
keywords. For more info see the PR where it all changed https://github.com/NancyFx/Nancy/pull/2441
NancyV1Module
I decided to try to create a new module that would add back the existing routing behavior by calling the new underlying methods in the NancyModule. This would allow me to simply change all my existing modules to extend this new class rather than the new Module in Nancy v2.Usage
This then adds back in all the existing routing. Just simply extendNancyV1Module
instead of NancyModule
.