-
Notifications
You must be signed in to change notification settings - Fork 1.5k
ArgumentException during bootstrapping when there are no views #143
Comments
Roy, As I read your issue report I immediately get a sense for what is happening. I believe the issue to be in the new view convention code and should be easy to resolve. I will investigate and resolve during the day. Thank you! |
Excellent! I'll keep watching the repo and let you know if the fix takes care of the problem I'm seeing. If you need more detailed diagnostics I can provide those as well, of course (if I know where to look :)). |
Pushed out some fixes to the master repo. Please let me know if this resolved the issue you were seeing. Thanks you! |
This fix solves the startup problems for the regular application, that's good. The bad thing is, is that the unit testing project still doesn't resolve the modules properly (only the FakeNancyModule gets registered). I'm just using a simple bootstrapper derived from DefaultBootstrapper and I did override the RootPathProvider property because otherwise I get an ArgumentNullException in FileSystemViewLocationProvider.cs: line 43. |
I've just spent some time getting a repro scenario up and running, and I couldn't get it to fail :) And, again, I can confirm that this commit DOES solve the startup problems. Thanks for the help! |
I found why the module didn't get loaded properly in the tests. Apparently I need to add this to my bootstrapper:
Any idea how I can avoid this? |
Hi,
Recently there have been some refactorings in the bootstrappers and conventions, and now I get an ArgumentException in the DefaultViewLocator when it is trying to find views.
In my project I don't have any views since it is a REST-based app that only returns JSON.
I tried to patch this, but it seems that there are still additional exceptions being thrown during initial bootstrapping when I try to unit test everything, since the Nancy.Testing code only finds "FakeNancyModule" after the bootstrapping process, which seems to indicate that the bootstrapping process failed somehwere halfway through.
So I guess a "no views" application is not functioning properly at the moment. I can spend some time figuring out the exact cause, but I just want to put this out there, since it may be trivial to fix for you.
Roy
The text was updated successfully, but these errors were encountered: