4

I have a MVC project and I'm using devexpres 14.1.6. I defined devexpress scripts and stylesheets on _Layout.cshtml page as below

head =>

 @Styles.Render("~/Content/css")
    @Styles.Render("~/Content/Bootstrap/css")
    @Scripts.Render("~/bundles/modernizr")

    @Scripts.Render("~/bundles/jquery")
    @Scripts.Render("~/bundles/bootstrap")
    @RenderSection("scripts", required: false)

    @Html.DevExpress().GetScripts(
    new Script { ExtensionSuite = ExtensionSuite.NavigationAndLayout },
    new Script { ExtensionSuite = ExtensionSuite.HtmlEditor },
    new Script { ExtensionSuite = ExtensionSuite.GridView },
    new Script { ExtensionSuite = ExtensionSuite.PivotGrid },
    new Script { ExtensionSuite = ExtensionSuite.Editors },
    new Script { ExtensionSuite = ExtensionSuite.Chart },
    new Script { ExtensionSuite = ExtensionSuite.Report },
    new Script { ExtensionSuite = ExtensionSuite.Scheduler },
    new Script { ExtensionSuite = ExtensionSuite.TreeList }

body =>

    @Html.DevExpress().GetStyleSheets(
    new StyleSheet { ExtensionSuite = ExtensionSuite.NavigationAndLayout },
    new StyleSheet { ExtensionSuite = ExtensionSuite.Editors },
    new StyleSheet { ExtensionSuite = ExtensionSuite.HtmlEditor },
    new StyleSheet { ExtensionSuite = ExtensionSuite.GridView },
    new StyleSheet { ExtensionSuite = ExtensionSuite.PivotGrid },
    new StyleSheet { ExtensionSuite = ExtensionSuite.Chart },
    new StyleSheet { ExtensionSuite = ExtensionSuite.Report },
    new StyleSheet { ExtensionSuite = ExtensionSuite.Scheduler },
    new StyleSheet { ExtensionSuite = ExtensionSuite.TreeList }
)

While my devexpress version is 14.1.3 my project was working perfectly but after I upgrated my devexpress version 14.1.3 to 14.1.6 I started recieve the following error =>

CS0121: The call is ambiguous between the following methods or properties: 'DevExpress.Web.Mvc.UI.HtmlHelperExtension.DevExpress(System.Web.Mvc.HtmlHelper)' and 'DevExpress.Web.Mvc.UI.HtmlHelperExtension.DevExpress(System.Web.Mvc.HtmlHelper)'

I cleaned Temporary ASP.NET Files but I recieved same error.

Eren
  • 117
  • 1
  • 10
  • 3
    Have you cleared the bin directory located in your web folder? (I have this when I upgrade DX controls and do not remove old dlls from bin) – Sascha Sep 17 '14 at 08:45
  • 1
    Yes you're right. I've cleaned dlls in bin folder and It is work thank you for your answer. – Eren Sep 17 '14 at 08:57
  • I will post an answer, please accept it for others with the same problem – Sascha Sep 17 '14 at 09:35

1 Answers1

6

If you upgrade the DX version the old assemblies will not get removed from the bin directory.

Then the mentioned error will show up. Manually clean the directory ( VS does not know the old files anymore and probably will not delete them ).

Edit: This not only applies to DX assemblies but any assembly you might upgrade.

Sascha
  • 10,231
  • 4
  • 41
  • 65