Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

The type or namespace name 'Objects' does not exist in the namespace 'System.Data'

Posted on 2014-02-18
2
Medium Priority
?
3,228 Views
Last Modified: 2014-02-18
I built an MVC 4 Entity Framework 5 for 6 weeks.  I have compiled the project many times successfully.  I copied the project to a different machine to develop during the blizzard.  Again I have compiled it many times.  

Then I needed to add another controller and the wizard kept returning a "object reference needs an instance of an object" error.  After much research and many attempts at fixing this, I finally fixed this by carrying out a repair of the VS 2012 installation.  I added the controller, added code to the controller, and then added an stored procedure to the database and carried out an update from the database for the Entity Framework.  Once this was completed I carried out a check of the Model Browser and verified the existence of the stored procedure in both the list of stored procedures and Complex objects.  After this I did a compile.  I got the above error in the  context.cs file which caused errors everywhere the context is called.  I don't know where this came from.  After entering a forum entry, I moved the project back to the computer at work after the long weekend.  The error is still displayed with the red squiggly lines under the using System.Data.Objects statements.  I did a build and suddenly the appears a "restoring Nuget Packages that appear in file packages.config" message and it starts installing the Nuget Packages for DotNetOpenAuth which I had removed as being undesired since we are not permitted to use it.  Then it went on to install other Nuget Packages like System.Spatial, which I was not even aware of having had installed since we have no use for that either.

When that was completed then I get a warning that the web.config element "entityFramework has invalid child elements "providers" List of possible elements expected: 'contexts'.

However I made no changes to that section of the web.config.  What is there is what Visual Studio put there.

I am totally at a work stoppage here because of this.

"Help me Obi-wan Kenobi.  You're my only hope."
0
Comment
Question by:Edward Joell
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
2 Comments
 

Accepted Solution

by:
Edward Joell earned 0 total points
ID: 39867815
I fixed it.  Somehow, apparently during the reinstall of Visual Studio, the reference to System.Data.Entity was lost.  While one would not think this had anything to do with System.Data.Objects, in fact once this references was re-added, then all of the squiggly lines went away.  And the build completed successfully.   Very strange.
0
 

Author Closing Comment

by:Edward Joell
ID: 39867852
The solution works and all is right with the world.
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

A quick way to get a menu to work on our website, is using the Menu control and assign it to a web.sitemap using SiteMapDataSource. Example of web.sitemap file: (CODE) Sample code to add to the page menu: (CODE) Running the application, we wi…
User art_snob (http://www.experts-exchange.com/M_6114203.html) encountered strange behavior of Android Web browser on his Mobile Web site. It took a while to find the true cause. It happens so, that the Android Web browser (at least up to OS ver. 2.…
This tutorial covers a step-by-step guide to install VisualVM launcher in eclipse.
THe viewer will learn how to use NetBeans IDE 8.0 for Windows to perform CRUD operations on a MySql database.

636 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question