?
Solved

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

Posted on 2014-02-18
2
Medium Priority
?
3,140 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

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Question has a verified solution.

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

Introduction This article shows how to use the open source plupload control to upload multiple images. The images are resized on the client side before uploading and the upload is done in chunks. Background I had to provide a way for user…
Problem Hi all,    While many today have fast Internet connection, there are many still who do not, or are connecting through devices with a slower connect, so light web pages and fast load times are still popular.    If your ASP.NET page …
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.
Suggested Courses

764 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