I am trying to play around with different view engines. Whenever I am trying to add View from Controller, There's nothing available to select ViewEngine as we are avail in VS2010.
How can I select Spark or ASPX in VS 2015?
NOTE :
1. I have installed Spark from NuGet.
2. Create Spark folder next to Razor and ASPX folders under "AddView" folder.
3. Checked Spark reference in my project.


Karthik ElumalaiRank #544 · 4.5K reputationPosted May 21, 2017, 6:38 PM EDT
Karthik ElumalaiRank #544 · 4.5K reputationPosted May 23, 2017, 7:29 AM EDT
Step 1: Navigate to the following path and create a folder with name="Spark". Spark specific templates must be copied into "Spark" folder.
C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\ItemTemplates\CSharp\Web\MVC 4\CodeTemplates\AddView
Step 2: Create an xml file with in "Spark" folder. The name of the XML file must be "ViewEngine.xml" and must contain the following xml content.
ViewFileExtension=".spark"
DefaultLayoutPage="~/Views/Shared/_Layout.spark"
PartialViewFileExtension=".spark" />
Now, right click on any controller action method and select "Add View" from the context menu. Notice that, "Spark" view engine is also listed.
Sumit SharmaRank #1,579 · 1K reputationPosted May 22, 2017, 10:55 PM EDT
Sumit SharmaRank #1,579 · 1K reputationPosted May 24, 2017, 12:49 AM EDT