1

I am trying to set up Combres on an Asp.Net MVC 3 site following this tutorial from their documentation.

I followed all of the steps, but when I run I get the following error:

Compilation Error

Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately.

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

Source Error:


Line 5:      
Line 6:      @Sprite.ImportStylesheet("~/App_Sprites/")
--->    Line 7:      @Url.CombresLink("siteJs")
Line 8:      <script src="@Url.Content("~/Scripts/excanvas.js")" type="text/javascript"></script>
Line 9:      @RenderSection("HeadScripts", required: false)

siteJs is my javascript resourceSet reference in the conbres.xml file. In my web config I have:

<system.webServer>
    <modules runAllManagedModulesForAllRequests="true">
        <add type="Microsoft.Web.Samples.ImageOptimizationModule" name="Microsoft.Web.Samples.ImageOptimizationModule" />
        <add name="ScriptModule" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
        <add name="UrlRoutingModule" type="System.Web.Routing.UrlRoutingModule, System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"/>
    </modules>
    <validation validateIntegratedModeConfiguration="false" />
</system.webServer>

(This is using a different version of System.Web.Routing.UrlRoutingModule than the one referred to in the tutorial. If I try to reference the version from the tutorial I cannot because I don't have the older DLL.)

How do I set this up properly?

CharlesB
  • 86,532
  • 28
  • 194
  • 218
NetHawk
  • 1,392
  • 1
  • 15
  • 33

1 Answers1

1

in the View have you included

@using Combres.Mvc
Manas
  • 2,534
  • 20
  • 21
  • I thought that I could put the namespace in the webconfig file. Putting it in the view fixed the issue. – NetHawk Jan 17 '12 at 18:23
  • http://stackoverflow.com/questions/18254158/facing-issue-while-trying-to-cache-images-js-files-using-combres-nuget-package – Imad Alazani Aug 15 '13 at 14:27