We're trying to use a Model-First with Entity Framework in Visual Studio, targeting an Oracle XE 11g installation.
No matter from what angle we're approaching the issue, we always end up with an "Object reference not set to an instance of an object" in Visual Studio:
- Add new ADO.NET Entity Framework Model to a .NET Framework 4.5 project
- Empty model
- Add some entities and associations
- Set Database Generation Workflow to "Generate Oracle Via T4 (TPT).xaml"
- Set DDL Generation Template to "SSDLToOracle.tt"
- Generate Database From Model
- VS asks for DB connection ==> Click "New Connection"
- Enter the connection properties to the Oracle XE database. "Test Connection" tells me the connection is okay.
- Click OK. Visual Studio shows the following error message:
(here's the image if it's not visible: https://dl.dropboxusercontent.com/u/35614983/vs2012_oracle_ef_error.png)
We also tried to generate the model in VS2010 and then manually transform it to an EF5 / VS2012 model. At the "Generate Database from Model" step, the same error appeared.
We also tried to generate the model from database (Database-First approach). Same error.
- Windows 7 Ultimate 64-bit
- Installed Oracle client: ODTwithODAC1120320_32bit.zip, so the version is 22.214.171.124.20
- Visual Studio 2012 Update 3 (11.0.60610.01)
Thanks for any hints!
EDIT: I just read that ODP.NET doesn't seem to support Entity Framework 5, so I tried a new project with Entity Framework 4.1, but I get the same errors.
EDIT 2: On a 32-bit Windows 7 virtual machine, everything works fine. Seems the problem is only there on my 64-bit Windows 7 machine.
Sorry for the delay on this one. Let me know if you are still seeing this and I will see if we can get more diagnostic info somehow.
That error is basically an exception fault. It means a bug or a misconfiguration of Oracle Developer Tools. Can you try to reinstall ODT and see if you notice any unusual errors during install.. and see if a reinstall fixes the problem?