 |
BOOK: Beginning ASP.NET 4 : in C# and VB
 | This is the forum to discuss the Wrox book Beginning ASP.NET 4: in C# and VB by Imar Spaanjaars; ISBN: 9780470502211 |
Welcome to the p2p.wrox.com Forums.
You are currently viewing the BOOK: Beginning ASP.NET 4 : in C# and VB section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
|
|
|
|
|

April 20th, 2014, 01:14 AM
|
|
Registered User
|
|
Join Date: Apr 2014
Posts: 6
Thanks: 1
Thanked 0 Times in 0 Posts
|
|
Many types or namspaces not found?
In Chapter 14, I loaded the database and the folders to my solution. After I compiled the project I ended up getting 174 errors. I believe this might have to do with Entity Framework. All of my errors are on the Designer.CS file, and they range from things like "The type or namespace name 'ObjectSet' could not be found. This is happening for 'EntityReference', 'EntityObject', 'EntityCollection', etc.
Is there any way that I can fix this?
Thanks!
|
|

April 20th, 2014, 03:52 AM
|
 |
Wrox Author
|
|
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
|
|
Hi there,
Which version of Visual Studio are you using? VS 2010 as the book assumes?
If you're using a later version, do you see a few .tt files in your app_code folder on disk?
If I know the version you're using, I might be able to figure out what's going on.
Cheers,
Imar
|
|

April 20th, 2014, 11:43 AM
|
|
Registered User
|
|
Join Date: Apr 2014
Posts: 6
Thanks: 1
Thanked 0 Times in 0 Posts
|
|
Hey Imar, thanks for getting back to me.
I'm actually using Visual Studio 2012. From what I am reading 2010 and 2008 don't seem to have this same issue. I'm wondering if it is a file path thing.
|
|

April 20th, 2014, 12:59 PM
|
 |
Wrox Author
|
|
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
|
|
For VS 2012, try this:
1. With the designer for the EDMX file open, Click somewhere on an empty spot of the designer surface and press F4 to open the Properties Grid. Change the Code Generation Strategy property from None to Default.
2.Save and close the diagram and then delete the fi les PlanetWrox.tt and PlanetWrox.Context.tt from the App_Code folder.
Rebuild the project (Webite | Rebuild or press Ctrl+Shift+B) and then try again.
Does it work then?
Imar
|
|

April 22nd, 2014, 08:31 PM
|
|
Registered User
|
|
Join Date: Apr 2014
Posts: 6
Thanks: 1
Thanked 0 Times in 0 Posts
|
|
Hey Imar,
I tried changing the code generation strategy to default, I ended up just right clicking to hit "reset" and the field changed to "Legacy ObjectContext" I deleted the .tt file and rebuilt it but I am still getting 459 errors.
|
|

April 23rd, 2014, 07:10 AM
|
 |
Wrox Author
|
|
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
|
|
Does your project have a reference to the Entity Framework? (Check the web.config for the references).
Also, try running the following command from the Package Manager Console:
Install-Package EntityFramework
You may need to uninstall first, using
Uninstall-Package EntityFramework
Hope this helps. If not, can you make a zipped version of your site available somewhere so I can take a look?
Imar
|
|
The Following User Says Thank You to Imar For This Useful Post:
|
|
|

May 30th, 2014, 12:09 PM
|
|
Registered User
|
|
Join Date: Apr 2014
Posts: 6
Thanks: 1
Thanked 0 Times in 0 Posts
|
|
Sorry for the extremely late reply.
This worked fine.
|
Similar Threads
|
| Thread |
Thread Starter |
Forum |
Replies |
Last Post |
| New operation types |
scott.nortman |
BOOK: Professional Microsoft Robotics Studio ISBN: 978-0-470-14107-6 |
1 |
June 30th, 2008 05:14 AM |
| Data Types |
edward2006 |
Infopath |
0 |
November 7th, 2005 06:06 PM |
| Types |
DARSIN |
Oracle |
2 |
February 5th, 2005 12:14 AM |
| Data Types |
bph |
Access VBA |
3 |
January 25th, 2004 05:50 PM |
|
 |
|