locked
Feature 'extension method' cannot be used because it is not part of the ISO-2 C# language specification

    السؤال

  • After upgrading to VS2010 from VS2008, my ASP.NET MVC 2.0 application (v3.5 framework)(manually converted from 1.0) views generate an error for each <%= Html. ..%> directive (the error message is the question title). The errors are shown in the 'error list' view when viewing a page/aspx or control/ascx document in the IDE.

    When the application is run, the runtime correctly compiles the pages/controls and the application runs without any compiler complaints.

    Any help with this annoyance would be greatly appreciated!

    06/ربيع الثاني/1431 05:13 م

الإجابات

  • My VS 2010 solution, contained a number of C# sub-projects (class libraries) as well as the main MVC 2 application. I found that if when I edited the csproj for the main application by changing:

    <ProductVersion>9.0.30729</ProductVersion>

    to

    <ProductVersion></ProductVersion>

    I no longer get the compiler errors in the IDE!

     

    • تم وضع علامة كإجابة بواسطة Todd Thomson 06/ربيع الثاني/1431 05:58 م
    06/ربيع الثاني/1431 05:58 م