locked
when i run my mvc application i got this compile time error RRS feed

  • Question

  • Server Error in '/' Application.

    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: CS0104: 'Scripts' is an ambiguous reference between 'System.Web.WebPages.Scripts' and 'System.Web.Optimization.Scripts'

    Source Error:
    Line 6:      <title>@ViewBag.Title</title>
    Line 7:      @Styles.Render("~/Content/css")
    Line 8:      @Scripts.Render("~/bundles/modernizr")
    Line 9:  
    Line 10: 

    Source File: d:\Brijo\HealthLevel\HealthLevel\Views\Account\Login.cshtml    Line: 8 
    Show Detailed Compiler Output:

    Show Complete Compilation Source:

    please guide me what can i do

    thanks in advance,.....

    • Moved by Caillen Tuesday, August 12, 2014 9:41 AM
    Monday, August 4, 2014 10:21 AM

Answers

All replies

  • Include the namespace in front of the Scripts class on the 8th line:

    @System.Web.Optimization.Scripts.Render("~/bundles/modernizr")

    Note that ASP.NET questions should be posted here: http://forums.asp.net.

    • Proposed as answer by Caillen Tuesday, August 5, 2014 7:24 AM
    Monday, August 4, 2014 12:52 PM
  • Please post questions related to MVC in the ASP.NET forums (http://forums.asp.net ).
    • Proposed as answer by Caillen Tuesday, August 5, 2014 7:24 AM
    • Marked as answer by Just Karl Saturday, August 23, 2014 6:10 PM
    Monday, August 4, 2014 1:53 PM
  • i am already put the namespace in front of the Scripts class on the 8th line:

    but its not worked

    @System.Web.Optimization.Scripts.Render("~/bundles/modernizr")


    Thursday, August 7, 2014 9:46 AM