none
Could not load type 'DataClassesDataContext'. RRS feed

  • Question

  • Moving code from VS2008 (written by someone else) into VS2017.  Compiles but page crashes.

    <

    asp:LinqDataSourceID="LinqDataSource1"runat="server"ContextTypeName="DataClassesDataContext"TableName="Actuals" EnableUpdate="True"OrderBy="sDate"Where="sDate &gt;= @sDate">     

    <WhereParameters>     

    <asp:SessionParameterName="sDate"SessionField="Today"Type="DateTime"/>                   

    </WhereParameters>                

    </asp:LinqDataSource>

    Others with similar problem were told to do "Project" --> "Add New Item" --> "Linq to SQL", which doesn't show up in my VS2017.

    Is there a way to resolve without having to rewrite this web page?  If so, how? 

    Thanks

    Monday, July 16, 2018 7:46 PM

All replies

  • Hi KLGreene,

    >>Others with similar problem were told to do "Project" --> "Add New Item" --> "Linq to SQL", which doesn't show up in my VS2017.Is there a way to resolve without having to rewrite this web page?  If so, how? 

    "Editing .dbml files with a designer surface requires the LINQ to SQL tools which are not installed by default as part of any of the workloads of Visual Studio 2017. It can be installed by selecting the 'LINQ to SQL tools' item under the 'Code Tools' category in the 'Individual Components' tab of the Visual Studio installer."

    Best regards,

    Zhanglong


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Tuesday, July 17, 2018 2:41 AM
    Moderator
  • Didn't work.  Unfortunately, I am not able to make changes to VS on my computer.  Went to IT to have them do this.  Linq to Sql was added/installed.  Didn't work.  Just got new computer.  IT had minimal install of VS (could not even load my ASP.NET code), so I modified (while I still had admin priv) to include what I needed as well as anything else I thought *might* be involved (making sure Linq to SQL was still there).  Just now tested.  I get the same error as before:  Could not load type 'DataClassesDataContext'.

    Any other suggestions?

    Thursday, August 16, 2018 5:17 PM
  • Didn't work.   Just got new computer.  IT had minimal install of VS (could not even load my ASP.NET code), so I modified (while I still had admin priv) to include what I needed as well as anything else I thought *might* be involved (making sure Linq to SQL was still there).  Just now tested.  I get the same error as before:  Could not load type 'DataClassesDataContext'.

    Any other suggestions?

    Monday, August 27, 2018 5:48 PM