Last post Jul 12, 2017 08:32 AM by Deepak Panchal
Jul 11, 2017 03:58 PM|msgtmark777|LINK
I've never run into this issue, couldn't find an answer and I need some assistance. First, I'm using VS2015 Enterprise version 14.0.25420.01 Update 3 Dot net framework 4.6.01055
I started a web form project and I'm attempting to build the main form with a LinqDataSource. I was using this document to guide me:
I was at this point in the procedure: "If Show only DataContext objects is selected, only classes that derive from
DataContext are displayed. If no classes appear in the list, you must create a class that represents the data. To do this, add a LINQ to SQL file to the App_Code folder, and then drag a database table onto the O/R Designer. LINQ to SQL automatically creates
the classes that represent the database and table."
Everything was fine. I pulled the table into the O/R Designer and saved it with a meaningful name. At that point I tried hitting F7 to view the code. This is when the object reference error came up. I expected to see at least an start and end sub line in
the class rather than an error.
It's not showing up as a LinqDataSource and I can't see any source code for that .dbml file. Any other LinqDataSource I build has the same problem.
Why can't I build a LinqDataSource and why can't I see the code?
Thank you for any guidance you might provide...
Jul 12, 2017 08:32 AM|Deepak Panchal|LINK
what happen if you close the error message?
is it display your code?
are able to run that code?
what if you save and close the project and then reopen it and try to see the code?
you can also try to make a test with new project.
it is possible that error not occur with new project.
you can also try to check the library reference , it is possible that you did not add the reference to the library you want to use and you are using object in your code which raise this error.