Error whilst importing EDMX

Posts   
 
    
JoeE
User
Posts: 11
Joined: 28-Nov-2023
# Posted on: 05-Dec-2023 08:56:37   

Hi,

I am trying to import an EF6 (.Net Framework 4.8 ) .edmx, but receive this error message. What could be the cause, or how can I get around it?

Exception information.
=============================================================
LLBLGen Pro version: v5.10. Build: 5.10.1

Exception details:
=====================
Message: The file C:\Users\JoeEveleigh\source\repos\coltech-international-entities\ColtechEntities\ColtechModel.edmx could not be loaded.
Source: SD.LLBLGen.Pro.Importers
Stack trace: 
   at SD.LLBLGen.Pro.Importers.EdmxImporter.EdmxToImportableHelper.InitializeContext(String fileName) in C:\Myprojects\VS.NET Projects\LLBLGen Pro v5.10\Designer\Importers\EdmxImporter\ToImportable\EdmxToImportableHelper.cs:line 132
   at SD.LLBLGen.Pro.Importers.EdmxImporter.EdmxToImportableHelper..ctor(String fileName, String entryExeLocation) in C:\Myprojects\VS.NET Projects\LLBLGen Pro v5.10\Designer\Importers\EdmxImporter\ToImportable\EdmxToImportableHelper.cs:line 112
   at SD.LLBLGen.Pro.Importers.EdmxImporter.ImportInformationRetriever.InitializeImportableHelper() in C:\Myprojects\VS.NET Projects\LLBLGen Pro v5.10\Designer\Importers\EdmxImporter\Importer\ImportInformationRetriever.cs:line 122
   at SD.LLBLGen.Pro.Importers.EdmxImporter.ImportInformationRetriever.GetFirstLevelInfo() in C:\Myprojects\VS.NET Projects\LLBLGen Pro v5.10\Designer\Importers\EdmxImporter\Importer\ImportInformationRetriever.cs:line 77
   at SD.LLBLGen.Pro.Importers.EdmxImporter.ImportInformationRetriever.GetFirstLevelInfo()
   at SD.LLBLGen.Pro.ApplicationCore.Extensibility.ImporterBase`1.GetFirstLevelInfo()
   at SD.LLBLGen.Pro.Gui.Forms.ImportDataRetrievalWizard.RefreshFirstLevelData()

Inner exception:-----------------------
Exception details:
=====================
Message: The provider did not return a ProviderManifest instance.
Source: System.Data.Entity
Stack trace: 
   at System.Data.Common.DbProviderServices.GetProviderManifest(String manifestToken)
   at System.Data.Metadata.Edm.StoreItemCollection.Loader.InitializeProviderManifest(Action`3 addError)
   at System.Data.EntityModel.SchemaObjectModel.Schema.HandleAttribute(XmlReader reader)
   at System.Data.EntityModel.SchemaObjectModel.SchemaElement.ParseAttribute(XmlReader reader)
   at System.Data.EntityModel.SchemaObjectModel.SchemaElement.Parse(XmlReader reader)
   at System.Data.EntityModel.SchemaObjectModel.Schema.HandleTopLevelSchemaElement(XmlReader reader)
   at System.Data.EntityModel.SchemaObjectModel.Schema.InternalParse(XmlReader sourceReader, String sourceLocation)
   at System.Data.EntityModel.SchemaObjectModel.Schema.Parse(XmlReader sourceReader, String sourceLocation)
   at System.Data.EntityModel.SchemaObjectModel.SchemaManager.ParseAndValidate(IEnumerable`1 xmlReaders, IEnumerable`1 sourceFilePaths, SchemaDataModelOption dataModel, AttributeValueNotification providerNotification, AttributeValueNotification providerManifestTokenNotification, ProviderManifestNeeded providerManifestNeeded, IList`1& schemaCollection)
   at System.Data.Metadata.Edm.StoreItemCollection.Loader.LoadItems(IEnumerable`1 xmlReaders, IEnumerable`1 sourceFilePaths)
   at System.Data.Metadata.Edm.StoreItemCollection.Init(IEnumerable`1 xmlReaders, IEnumerable`1 filePaths, Boolean throwOnError, DbProviderManifest& providerManifest, DbProviderFactory& providerFactory, String& providerManifestToken, Memoizer`2& cachedCTypeFunction)
   at System.Data.Metadata.Edm.StoreItemCollection..ctor(String[] filePaths)
   at SD.Tools.Edmx.ObjectContextExtended..ctor(String connectionString, String ssdlFileName) in C:\Myprojects\VS.NET Projects\LLBLGen Pro v5.10\Designer\Importers\EdmxImporter\Loader\ObjectContextExtended.cs:line 63
   at SD.Tools.Edmx.EdmxLoader.ProduceObjectContextFromConnectionString(String connectionString) in C:\Myprojects\VS.NET Projects\LLBLGen Pro v5.10\Designer\Importers\EdmxImporter\Loader\EdmxLoader.cs:line 65
   at SD.LLBLGen.Pro.Importers.EdmxImporter.EdmxToImportableHelper.InitializeContext(String fileName) in C:\Myprojects\VS.NET Projects\LLBLGen Pro v5.10\Designer\Importers\EdmxImporter\ToImportable\EdmxToImportableHelper.cs:line 128

Inner exception:-----------------------
Exception details:
=====================
Message: Could not determine storage version; a valid storage connection or a version hint is required.
Source: System.Data.Entity
Stack trace: 
   at System.Data.SqlClient.SqlVersionUtils.GetSqlVersion(String versionHint)
   at System.Data.SqlClient.SqlProviderManifest..ctor(String manifestToken)
   at System.Data.SqlClient.SqlProviderServices.GetDbProviderManifest(String versionHint)
   at System.Data.Common.DbProviderServices.GetProviderManifest(String manifestToken)

Inner exception: <null>
---------------------------------------
---------------------------------------

This is the schema information from the .edmx file. Schema Namespace="CCModel.Store" Provider="System.Data.SqlClient" ProviderManifestToken="2012" Alias="Self" xmlns:store="http://schemas.microsoft.com/ado/2007/12/edm/EntityStoreSchemaGenerator" xmlns:customannotation="http://schemas.microsoft.com/ado/2013/11/edm/customannotation" xmlns="http://schemas.microsoft.com/ado/2009/11/edm/ssdl">

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39766
Joined: 17-Aug-2003
# Posted on: 06-Dec-2023 10:06:42   

It sounds silly but EF can't deal with a ProviderManifestToken set to 2012 in some cases. If you change that to 2008 (at the top of the edmx file you can find the ProviderManifestToken) it should be loadable without the error thrown by entity framework.

Frans Bouma | Lead developer LLBLGen Pro
JoeE
User
Posts: 11
Joined: 28-Nov-2023
# Posted on: 06-Dec-2023 10:57:25   

Otis wrote:

It sounds silly but EF can't deal with a ProviderManifestToken set to 2012 in some cases. If you change that to 2008 (at the top of the edmx file you can find the ProviderManifestToken) it should be loadable without the error thrown by entity framework.

Thank you. This worked.