问题
I'm trying to generate/update an edmx model from an oracle database and I need to create a new connection to that oracle database. When I click "Test Connection" it succeeds but when I click "OK" it gives the following error:
Operation is not valid due to the current state of the object
VS 2017 error when adding new connection to update edmx model
回答1:
I had the exact same issue after a brand new installation of VS2017.
- Installed VS2017 (enterprise edition, in my case).
- Previously ODT didn't work in the community edition, but Oracle might have fixed that.
Installed Oracle Developer Tools for Visual Studio 2017
- ODT broke VS2017 and I had to do a "repair", which fixed the problem where VS2017 wouldn't even start. This is where a started getting the problem you described.
Reinstalled ODAC 12.2c Release 1 and Oracle Developer Tools for Visual Studio (12.2.0.1.0)
- It was previously installed for VS2015.
Now, everything works as expected and I'm able to e.g. refresh my EF6 models.
来源:https://stackoverflow.com/questions/45619948/entity-data-model-wizard-gets-exception-when-trying-to-add-a-new-oracle-connecti