Nancy.Serialization.JsonNet | NewtonSoft.Json serializer for Nancy | JSON Processing library
kandi X-RAY | Nancy.Serialization.JsonNet Summary
kandi X-RAY | Nancy.Serialization.JsonNet Summary
Implementations of the ISerialization and IBodyDeserializer interfaces, based on Json.NET, for Nancy.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of Nancy.Serialization.JsonNet
Nancy.Serialization.JsonNet Key Features
Nancy.Serialization.JsonNet Examples and Code Snippets
Community Discussions
Trending Discussions on Nancy.Serialization.JsonNet
QUESTION
I created a VS2017 solution using the "new" csproj
format, it's a web .net 4.6.1 application written using Nancyfx, serving pages thru owin and IIS.
All my views are under the Views
folder but if I don't set the Copy to Output
options IIS cannot find them (the same is true for my custom config files).
The problem, I think, is that the output directory is automatically set to bin\net461\win7-x86
instead of simply bin
and the working directory of the web app is set to the output dir, so I have to set the copy to output
option.
How can I use the new csproj format but retain the ability to edit view files without rebuilding the app? I already tried to set the output folder to bin
but it is ignored. I also tried to set the the Working Directory value in the Debug tab but to no avail. I set the values in every configuration (debug/release) so that's not the issue.
This is my csproj file:
...ANSWER
Answered 2017-Jul-29 at 19:12After two days spent trying I found the root cause of the problem: it was not a VS/csproj problem but rather a Nancyfx 2.0 configuration issue.
For everyone interested here are the steps that I followed to fix the problem:
- Implement an
IRootPathProvider
configured to return the value ofIHostingEnvironment.ContentRootPath
as taken from yourStartup
class - Register the custom
IRootPathProvider
in yourBootstrapper
overridingIRootPathProvider RootPathProvider { get; }
- By default in Nancyfx 2.0 the view are always cached, even in debug mode (see this ticket), so in your
Bootstrapper
override the configure method as shown below.
Method Bootstrapper.Configure
:
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install Nancy.Serialization.JsonNet
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page