Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

VfpEntityFrameworkProvider2 won't work with VS2017 #8

Open
horch004 opened this issue Jul 12, 2017 · 10 comments
Open

VfpEntityFrameworkProvider2 won't work with VS2017 #8

horch004 opened this issue Jul 12, 2017 · 10 comments

Comments

@horch004
Copy link

I had VfpEntityFrameworkProvider2 installed with VS2015 and it worked fine. Now I upgraded to VS2017 and the model designer is not able to update the model from the database anymore.

I get the following error:
An exception of type 'System.ArgumentException' occurred while attempting to update from the database. The exception message is: 'Unable to convert runtime connection string to its design-time equivalent. The libraries required to enable Visual Studio to communicate with the database for design purposes (DDEX provider) are not installed for provider 'VfpEntityFrameworkProvider2'. Connection string: data source=".....".

I deinstalled the provider and client and reinstalled the nuget package, vfpoledb and VfpEntityFrameworkProvider.msi. Nothing helps.

Any thoughts?

@tombrothers
Copy link
Owner

It turns out that VS2017 made some significant changes that prevent me from registering the VFP EF Provider in the same way that I have for previous VS versions. I started working on a VSIX installer for VS2017 but I have yet to complete work on the installer. So currently, the VFP EF Provider will not work with VS2017's designer.

@horch004
Copy link
Author

Thanks for your work.
We were currently testing EF6 and the vfp provider. Its no problem to wait some time. We are not in a hurry.

@pmax101
Copy link

pmax101 commented Nov 9, 2020

Hi Tom, I am being forced to upgrade to VS2019 due to some other components I use that have no support for VS2015.

I see that you have a new beta version, will this version work with VS2017-2019? Thanks!

@tombrothers
Copy link
Owner

@pmax101 no, I'm not going to try to get it to work with the VS2017-2019 designer.

@mPisano
Copy link

mPisano commented Nov 16, 2020

Tom,
I think pmax101 is referring to the csproj file, not the older code first designer,
I also build in vs2017 and have reverted the prior project files. Other projects leave the originals and create newer core project files. (ie VfpEntityFrameworkProvider_NetStandard.csproj) or _Core...

Thanks for the other merge.

Regards,
Mike

@tombrothers
Copy link
Owner

@mPisano I'm don't understand the issue. Are you suggesting that I modify this repository to include _NetStandard and/or _Core projects?

@tombrothers tombrothers reopened this Nov 16, 2020
@mPisano
Copy link

mPisano commented Nov 16, 2020

I would roll back the original project files for VFPEF and Client that supported Vs2015/17 and have newer Project files for vs2019/Core. Underlying Issue is VS 15/17 do not support the Microsoft.NET.Sdk\Roslyn build system.

also remember to Add:
TRACE;NET461
to the Configs and you need to put the /Properties files back

I think you will also need to exclude /Properties in the newer projects ...

HTH,
MIke

@pmax101
Copy link

pmax101 commented Nov 16, 2020

Hi,

Mike's post is well beyond my level of understanding, but my idea was just to be able to use your components in VS2019 with a legacy VFox DB that unfortunately I still need to read from.

I could perfectly live with designing in VS2015 and using the generated files in VS2019 without opening/updating the designer at all.

As always, thanks to both.

@cvivieca
Copy link

I'm getting this error on VS2015. Someone else is getting same issue on this version?

@mPisano
Copy link

mPisano commented Dec 29, 2020

if you are having trouble building under VS2015 then use my fork or the .csproj files in my branch.

if your referring the to DDEX error then make sure you install the VFPOLEDB package as All Users.
Also - if by DDEX, you mean reverse engineering of tables, I think this is only supported in 2015.
I have been manually changing my POCO classes to mirror changes in my VFP tables in 2017 and 2019

If your error is at runtime not being able to find the provider, I've been adding the Following to my App.Config files

<configuration>
...
  <system.data>
    <DbProviderFactories>
      <clear />
      <add name="Vfp Entity Framework Provider" invariant="VfpEntityFrameworkProvider2" description="Vfp Entity Framework Provider" type="VfpEntityFrameworkProvider.VfpProviderFactory, VfpEntityFrameworkProvider" />
    </DbProviderFactories>
  </system.data>
</configuration>

If it's none of the above, please explain your error.

Regards,
MIke

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants