Note that there are some explanatory texts on larger screens.

plurals
  1. PORazor imported namespaces
    primarykey
    data
    text
    <p>I'm having issues with my extensions to the UrlHelper class as they are not being picked up. So far I've done the following:</p> <p>1) Added the namespaces to the section in the web.config located in the Views folder. I've also added them into the main web.config to be sure.</p> <p><code>&lt;system.web.webPages.razor&gt;</code></p> <p>2) Made sure that the System.Web.Mvc reference in the csproj file is for MVC3. I've also made sure the System.Web.WebPages and System.Web.Helpers references are included.</p> <p>3) Made sure that the csproj ProjectTypeGuids are correct.</p> <p><code>{E53F8FEA-EAE0-44A6-8774-FFD645390401};{349c5851-65df-11da-9384-00065b846f21};{fae04ec0-301f-11d3-bf4b-00c04f79efbc}</code></p> <p>4) Checked that the bindingRedirect points to MVC3.</p> <pre><code>&lt;runtime&gt; &lt;assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"&gt; &lt;dependentAssembly&gt; &lt;assemblyIdentity name="System.Web.Mvc" publicKeyToken="31bf3856ad364e35" /&gt; &lt;bindingRedirect oldVersion="1.0.0.0-2.0.0.0" newVersion="3.0.0.0" /&gt; &lt;/dependentAssembly&gt; &lt;/assemblyBinding&gt; &lt;/runtime&gt; </code></pre> <p>Am I missing anything as Google hasn't brought up anything different?</p> <p>The code is as follows (with the non-relevant stuff stripped out):</p> <pre><code>namespace MyNameSpace.Controllers.Extensions { using System.Web.Mvc; using System.Web.Routing; using Contracts.Entities; using Controllers.Routing; public static class UrlHelperExtensions { public static string BrowseLink(this UrlHelper urlHelper, ICategory category) { var routeValueDictionary = new RouteValueDictionary { { "categorypath", BrowsePath.Serialize(catagory) }, { "pagenumber", "1" } }; return urlHelper.Action("Index", "Browse", routeValueDictionary); } } } </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload