ASP.NET MVC + S # arp Architectur + Spark View Engine - cannot use ActionLinkForAreas

I decided to use ASP.NET MVC, S # arp Architectur and Spark View Engine for my new project.

First, I created a new project using S # arp.

I tried updating the S # arp archive view for .spark files.

This works fine, with one exception. The ActionLinkForAreas method used in Application.spark was not found in the HTMLHelper class:

error CS1061: 'System.Web.Mvc.HtmlHelper' does not contain a definition for 'ActionLinkForAreas' and no extension method 'ActionLinkForAreas' accepting a first argument of type 'System.Web.Mvc.HtmlHelper' could be found (are you missing a using directive or an assembly reference?)

Call in Application.spark: $ {Html.ActionLinkForAreas (c => c.Index (), "Home")}

It’s strange that it worked before I added the Spark View Engine

I would really appreciate your help

+3
1

, , SharpArch.Web.Areas, Spark.

Spark - :

var settings = new SparkSettings(); 
settings.AddNamespace("SharpArch.Web.Areas");
engines.Add(new SparkViewFactory(settings));

.spark :

<use namespace="SharpArch.Web.Areas" />
+2

Source: https://habr.com/ru/post/1727984/


All Articles