iMatoria
iMatoria

Reputation: 1448

Deploying default.cshtml outside of MVC project

I am using RazorEngine and Template functionality to prepare some pages as default.cshtml. These default.cshtml are very simple with some HTML/JS/CSS code and 1-2 lines of MVC if/else blocks. I need to deploy these files outside of the MVC project and directly under a blank asp.net website running 4.5.2 framework.

Can you please let me know what should be web.config entries and what assembly files are to be deployed in the bin folder. FYI: This website will not have anything except these default.cshtml and web.config/bin/etc., if required.

FYI: I am generating these default.cshmtl files using MVC 5.2.3.0, RazorEngine 3.7.2.0.

Upvotes: 1

Views: 292

Answers (1)

Chris Pratt
Chris Pratt

Reputation: 239290

You pretty much answered your own question. If you've got a cshtml file, then you need MVC and Razor to render it. If you're using RazorEngine to generate them in the first place, then you could simply output them as *.html instead of *.cshtml, and then you wouldn't need anything. As long as it has Razor code that needs to be processed, you need MVC and Razor.

Upvotes: 1

Related Questions