Question

I am creating a WPF Browser App in which I need to be able to access and insert data into a SQL Server table. Before adding the data source, the program builds and runs just fine. After using the wizard to add the ADO.NET Entity Data Model component, I try to build it and get the error

Error 2 The type name 'App' does not exist in the type 'ServiceRequest.ServiceRequest' C:\Projects\WPF\ServiceRequest\ServiceRequest\obj\Debug\App.g.cs 60 28 ServiceRequest

I even tried creating a new WPF Browser App, adding only the data source and nothing else, and get the same error. I looked at the app.g.cs file before and after adding the data source, and they are identical. How could this be causing an error when nothing has changed?

Thank you for any help.

UPDATE: Found that if I only include a stored procedure rather than only including a table, I do not get any errors.

Was it helpful?

Solution

I was able to determine that I got the error because my project and the table I was adding had the same name. Changing the name of my project fixed it.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top