user1659459
user1659459

Reputation: 65

VistaDb5 with entityframework 4 error

I am checking the EntityFrameworkBasics sample project which comes with the installation of VistaDB5. When I try to build the project it successfully compiles despite the error message given below:

Error 1 Error 168: A null was returned after calling the 'GetService' method on a store provider instance of type 'VistaDB.Provider.VistaDBProviderFactory'. The store provider might not be functioning correctly. C:\Users\Public\Documents\VistaDB 5\Samples\Entity Framework\Basics\EFSampleCRUD\EmployeeModel.edmx 7 7 EFSampleCRUD

I havenot changed any changes to the project files.The app.config file is below:

<?xml version="1.0" encoding="utf-8"?>
 <configuration>
   <connectionStrings>
    <add name="Entities" connectionString="metadata=res://*/EmployeeModel.csdl|res://*/EmployeeModel.ssdl|res://*/EmployeeModel.msl;provider=System.Data.VistaDB5;provider connection string='Data Source=&quot;SimpleDB.vdb5&quot;'" providerName="System.Data.EntityClient"/>
  </connectionStrings>
  <system.data>
    <DbProviderFactories>
    <remove invariant="System.Data.VistaDB5" />
     <add invariant="System.Data.VistaDB5" name="VistaDB 5 Data Provider"
       description="VistaDB 5 ADO.NET Provider for .Net 4"
       type="VistaDB.Provider.VistaDBProviderFactory, VistaDB.5.NET40" />
    </DbProviderFactories>
    </system.data>
   </configuration>

However the after successful built there is no error while running the application. Also If I add a new ADO.NET Entity datamodel and choose generate from database and click on new connection I don't see VistaDB5 in the datasource or dataprovider section of VS2012

Upvotes: 0

Views: 261

Answers (1)

Kendall Miller
Kendall Miller

Reputation: 206

To address the issue with seeing VistaDB5 in the Visual Studio designers I'd recommend checking two things -

  1. Uninstall & reinstall VistaDB 5. The installation integrates with Visual Studio, registering itself as a DDEX provider which gets it on the lists in question. Simply having the VistaDB assemblies around isn't sufficient.
  2. Install the latest tooling for EF 6 if you have ever installed the tooling for EF 6. This tooling replaces the previous designers and there have been a few cases where the tooling introduced problems with third party providers like VistaDB.

If that doesn't resolve the issue I'd recommend contacting us and opening a ticket at: support.gibraltarsoftware.com

Upvotes: 0

Related Questions