Nancy with Razor: Opinions are cached, which makes development very difficult

I am new to Nancy and Razor (and MVC). If I made changes to the view, I must somehow restart the application (change web.config, restart the dev server, etc.) so that the changes affect.

I think cache can be Razor static dictionary? Does it store every compiled view? No doubt it's great for production, but how can I turn it off for development? I want to be able to change the view, save, build and see the changes.

Any recommendations are greatly appreciated. Thank.

+5
source share
1 answer

0,8, , InitializeInternal :

public class CustomBootstrapper : DefaultNancyBootstrapper
{
    protected override void InitialiseInternal(TinyIoC.TinyIoCContainer container)
    {
        base.InitialiseInternal(container);
#if DEBUG
        StaticConfiguration.DisableCaches = true;
#endif
    }
}
+2

All Articles