A new version of the Visual FoxPro Entity Framework Provider that targets EF6 is available. The purpose of this blog post is to outline what you need to get started using the EF Designer with the new provider. With the previous VFP EF Provider you could simply run the VfpEntityFrameworkProvider.msi installer and then have the provider available to you when you added a new “ADO.NET Entity Data Model” to your project. But EF6 requires a little more setup to get started. Most of this setup is handled by the VFPEntityFrameworkProvider2 NuGet Package. So lets get started with the NuGet package and look at the details of what needs to be done.
- Install the VFPEntityFrameworkProvider2 NuGet package.
- Make sure the VfpClient.dll and the VfpEntityFrameworkProvider.dll are set to copy local. Normally I would just suggest this as a deployment option but now this is required to get the designer to work.
Another requirement that the provider needs to be included in the config file (this is handled by the NuGet package).
- Install the VfpEntityFrameworkProvider.msi which can be found in the packages directory.
- Restart Visual Studio
- If you try to add a new “ADO.NET Entity Data Model” you will find that the provider is not available. The reason for this is that the EF6 Designer is looking for the EF Provider in the current project and is unable to find it until you build the project. After building the project you will find that the provider is available when you try to add a new “ADO.NET Entity Data Model.”
* Here is a video showing everything mentioned in this post.