repro steps:<br />0. Download the AdventureWork sample database from AdventureWorks2012 Data File <br />1. Create a Class Library project.<br />2. Add a new item of ADO.NET Entity Data Model.<br />3. Select Generate from Database<br />5. Select New Connection<br />6. Select Microsoft SQL Server Database File (SqlClient)<br />7. Select the sample database that you download for Database file name<br />8. Select all the tables, views, SP, and Functions to include the model. <br />9. Check the Output window, and it will show<br />Unable to generate the model because of the following exception: 'The table 'C:\USERS\YJHONG\DOCUMENTS\VISUAL STUDIO 11\PROJECTS\CLASSLIBRARY1\CLASSLIBRARY1\ADVENTUREWORKS2012_DATA.MDF.Production.Document' is referenced by a relationship, but cannot be found.<br />'.<br />Loading metadata from the database took 00:00:06.4616896.<br />Generating the model took 00:00:13.3010350.<br />Added the connection string to the App.Config file.<br />Writing the .edmx file took 00:00:00.0025093.<br />10. Check the generated edmx file, and it should not have any entities. <br />
↧
Edited Issue: Cannot generate the entity model diagram from the AdventureWorks sample database [695]
↧