I have a problem with Oracle Data Provider for .NET. I have:
just disinstalled and reinstalled new version of Oracle, I have now 12.1.0
Visual Studio 2015
Oracle Developer Tool for Visual Studio
I want to create a ASP.NET Web Application with Entity Framework 6.0. If I open one of my old projects or when I create a new one and download from Nuget Oracle.ManagedDataAccess and Oracle.ManagedDataAccessEntityFramework this appears:
and if I click OK, I continue and create a model based on Oracle it always says that my EntityFramework is not correct for that provider even if I followed this link or it crashes after setting the connection and click "Next".
What's wrong? Please help me..
Thats how I solved it:
Remove all folders wich names contains "Oracle" from:
Windows\Microsoft.NET\assembly\
Windows\assembly\
Then restart Visual Studio and it will work.
I used cmd in administrator mode to do that, because explorer or other file managers did not allow me to remove that folders.
Related
I cannot get VS 2015 to create my EDMX file for an Oracle Connection.
I am using Visual Studio 2015 Update 3
I have installed the Oracle Developer Tools 12.1.0.2.4
I have installed Oracle Data Access and the following DLLs exist under \ client[user]\product\12.1.0\client\odp.net\bin
2.x\Oracle.DataAccess.dll version: 2.121.2.0 ODAC Release 4
4\Oracle.DataAccess.dll version: 4.121.2.0 ODAC Release 4
I am using the following assemblies
Oracle.ManagedDataAccess Version: 4.122.1.0
Oracle.ManagedDataAccess.EntityFramework Version: 6.122.1.0
* I believe both of these are version 12.2.1100 based on the folders in which they reside in the packages folder.
There are no connections defined in the Server Explorer
My steps are as follows:
Within the Solutions Explorer, Right click on project and select "Add" | "New Item..."
Select Data | ADO.NET Entity Data Model | Add
Select EF Designer from Database | Press Next
In the Entity Data Model Wizard:
Press New Connection... (I get an warning "Failed to find the default tnsnames.ora file." I ignore and press "OK"
With the Datasource as "Oracle Database (ODP.NET, Managed Driver)" I enter the credentials and specify the the other
connection parameters and press "Test Connection" which SUCCEEDS.
I press OK and am taken to the next page in the Entity Data Model Wizard
I include sensitive data in connection string and Press Next....
WIZARD SHUTS DOWN (crashes) - NO EDMX CREATED
Any assistance in helping me troubleshoot this would be greatly appreciated.
TIA - Xavier
Thanks to #Hong-vit pointing me in the right direction. I found the answer.
When you visit the download page for ODAC you're given a selection of version numbers.
In my case the top two were:
ODAC 12.2c Release 1 and Oracle Developer Tools for Visual Studio (12.2.0.1.0)
ODAC 12c Release 4 and Oracle Developer Tools for Visual Studio (12.1.0.2.4)
For me the top one wouldn't install. It would cut out during the installation process (thanks Oracle!) so I settled with the second one (12.1.0.2.4).
This meant that when I installed Oracle.ManagedDataAccess and Oracle.ManagedDataAccess.EntityFramework I had to select the correct version.
Not for me:
The one I needed
As you can see the version numbers (almost!) match up:
ODAC 12.2.0.1.0 = Oracle.ManagedDataAccess 12.2.1100
ODAC 12.1.0.2.4 = Oracle.ManagedDataAccess 12.1.24160719 (yay!)
I believe this is a failing on oracles behalf as it's not made clear despite their inclusion on a page long readme on which this doesn't feature. In additon the version numbers not quite being the same...but that's a rant for the blog.
I have the same bug. I fixed it successfully by follow this step:
On your project Right click -> Select Manage NuGet packages on Browse tab input oracle. You will see Oracle.ManagedDataAccess.EntityFramework. Select version of oracle you have installed. This should be 12.1.2400. Install it, you are done
I had the same issue - I hope I can help fellow Googlers having the unfortunate task of connecting Oracle and Visual Studio.
I followed the steps and still got crashes - because I was using VS2017 (I understand that the questions is tagged VS2015). You'll need to install the VS2017 ODAC Client. Thankfully, this one actually does something when you begin the installation. The installer in the link on the accepted answer will only work for VS2015.
The most recent version (as of this time of writing) of ODP.NET is 18.3, which can be installed through NuGet (Oracle.ManagedDataAccess.EntityFramework). Follow these steps on Oracle's website and you'll be setup.
...Or so you think. I got the same error as in this stack overflow question, where it won't go past the Entity Data Model Wizard.
I applied every configuration in the selected answer, but it still wouldn't work. When I downgraded my Oracle.ManagedDataAccess.EntityFramework from 18.3.0 to 12.2.1100, I could finally create my models!
I have had the same problem when I was trying to connect Oracle Entity Framework with Visual Studio 2017.
After install and unistall several times differents version. The build that better works for me is:
Oracle Developer Tools for Visual Studio 2017 (ODTv2017) v12.2.1200
Oracle.ManagedDataAccess v12.2.1100
Oracle.ManagedDataAccess.EntityFramework v12.2.20190115
EntityFramework .NET v6.3.0
I think that having similar versions in Oracle packages is very important for good performance.
It looks like someone here had similar issue: He add to change implementation somehow.
[in this ]case a View (valid and worked) caused the crashes. After changing the implementation without using that view it worked (more or less).
What I advise is you proceed step by step, only importing one object for the first time you test the wizard, then only simple table, then add procedures, views...
Hi everyone and thanks for taking the time to see my question.
I'm running VS 2017 with Entity Framework 6 and asp.net MVC and have to add some field to one of my Entities.
I added the corresponding fields in the database, but when I open the edmx file nothing shows apart the message "Entity Data Model Designer is unable to open this file." and it proposes me to open it in XML editor, but I have not the "Update model from Database" option when right clicking on the XML file.
Is anyone knows what causes this ?
I finally came accross my problem. I searched for like 5 hours how to make a new database connection and realised I had no option with MySQL connection. So I found this thread and it led me on the good path. After, I found this cause I weren't able to install MySQL for Visual Studio. I followed these two steps:
Download and install the MySQL for Visual Studio component without the MySQL installer here
Download and install the "Connector/NET" V6.9.10. "mysql-connector-net-6.9.10.msi" here
After that I started Visual Studio and the Design Surface showed up well, and I was directly able to Update my model from the Database :D
EDIT: I just saw that MySQL for visual studio wasn't installed properly. In fact, it rolls back up at the end of the installation, and I have no Mysql Database option on the "new Database connection" window :/ Does somebody know what this is about ?
EDIT SOLUTION Turns out that I had installed Visual Studio on an other disk than C: and mysql for visual studio Installer didn't like that. Now I see "MySql Database" in the list when adding a new connection.
I am not able to show SQLite option while I'm going to add Entity framework via wizard in Visual Studio 2012 and Framework 4.5.
I have used below link:
http://system.data.sqlite.org/index.html/doc/trunk/www/downloads.wiki
but still I'm not able to show it.
There is no need to add Sqlite from wizard,you just need to add the .dll to your File System Editor while making a deployment. Here is the full tutorial of how you can achieve this.
include sqlite while build setup exe
Hope it helps.
I have Windows 8.1, MySql 5.6, and Visual Studio Ultimate 2012.
I am trying to set a DataSet, but I am having the error Cannot obtain provider factory for data provider named MySql.Data.MySqlClient when I try to drag a table to the DataSet.
a) The Server Explorer can access the database and show me all tables, and the "Test Connection" button returns a successful message.
b) I added MySql references to the bin folder (MySql.Data, MySql.Data.Entity, MySql.Web).
c) I edited the Web.config file removing MySql.Data.MySqlClient invariant and adding it again with "correct" settings. I tried to set <connectionStrings>, <DbProviderFactories>, membership providers, profile providers, and RoleManager providers;
d) I have already uninstalled and reinstalled MySql and Visual Studio.
Nothing seems to work, and the same error remains happening. I have already tried a lot of suggestions from this and other forums.
Worked for me, steps below:
Close Visual Studio
Run the MySQL Connector/Net and remove your installation
Run the Connector again and install as you have done prior to deletion(typical/custom).
Open Visual studio
Delete all connections to server/database/dataset from the solution and server explorer. Do not remove any lines of code.
Re-establish a connection to your database,naming it as it was.
Re-establish a connection to your data source for data set as it was.
Click play, be happy!
Hope this helps.
you have to install mysql connector
just download the last version of MySql connector and install it while closing visual studio
Make sure you have installed "Connector/NET" and "MySQL for Visual Studio". Run "MySQL Installer" and install those two.
C4U gave me the clue I needed after fighting with this all day. Connector/Net seemed to install with MySQL for Visual Studio when I used the installer the first time. I could create a connection in the Server Explorer but couldn't create a new connection from within my project. I also couldn't run the little blue button (MySQL Website Configuration). I tried rerunning the installer and couldn't find Connector/Net. It had not installed completely.
What worked:
I closed Visual Studio and opened Programs and Features from the Control panel and uninstalled ALL MySql Connector programs, including Connector/Net. Then I reran the same MySql Visual Studio Installer I had run before and, voila!, I could see the Connector/Net and install it. Then I opened Visual Studio, deleted my connections, and clicked on the little blue button (MySQL Website Configuration). Worked! I could also create a connection inside my project.
AND I didn't have to add ANY reference or ANYTHING to the config file.
I updated to Visual Studio 2013 last week and I can no longer update my Entity Data model through the visual studio designer (.edmx file).
When I right click > update model from database I now receive this 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. Connection string: server=192.168.100.103;user
id=xxx;password=xxx;database=xxx;persist security info=True'.
My connection string is as follows:
<connectionStrings>
<add name="DbEntities" connectionString="metadata=res://*/Db.csdl|res://*/Db.ssdl|res://*/Db.msl;provider=MySql.Data.MySqlClient;provider connection string="server=192.168.100.103;user id=xxx;password=xxx;database=xxx;persist security info=True"" providerName="System.Data.EntityClient" />
The process still works fine in Visual Studio 2012
Apparently MySql and Visual Studio 2013 don't work together yet.
Here is a link on the MySql forums:
http://forums.mysql.com/read.php?174,594798,600466#msg-600466
You'll probably need to wait for the next release of the MySql connector.
I can't even create a connection to a MySql DB from Server Exploer in Visual Studio 2013. Can you?
You need to download Mysql connector 6.8.3.0 and Mysql for Visual Studio 1.1.1(https://cdn.mysql.com/Downloads/MySQLInstaller/mysql-visualstudio-plugin-1.1.1.msi)
After that, it worked for me.
There is a new product for this now:
http://dev.mysql.com/downloads/windows/visualstudio/
Worked for me!
I had a similar problem with SQL Server Compact Edition. Although implied above, I'll explicitly state it: The answer for me was starting it in VS2012 and following the same steps to generate the database from the .edmx as I had tried in VS2013.
Most likely you are using an older version of MYSQL for VS or do not have any installed.
Simply Install/Update MySQL for visual studio
here : http://dev.mysql.com/downloads/windows/visualstudio/
This Worked for me
I also had this error message with Oracle. I previously had the Oracle ODT installed to make everything work with Visual Studio with our old database. However, I upgraded from the 12.1 to 12.2 ODT version of the tools when we migrated to a 12.2 server. That's when I started getting the above error.
For me, the fix was to update the machine.config. Change all references to the old driver version to the new driver version. In my case, I updated the Oracle.ManagedDataAccess from 4.121.1.0 to 4.122.1.0.
The problem is likely that MySQL for Visual Studio is missing. This can happen when Microsoft updates Visual Studio OR any related components.
You can check by:
Open your VS project.
Open Server Explorer and click on the connection.
Right click and open Properties. If the connection or provider are missing reinstall the connector and provider according to the instructions shown below:
STEPS on how to fix the problem:
NOTE: This uses version 6.8.10, your version may be different. Whatever version you use, all installed components MUST BE COMPATIBLE. That includes the Connector, MySQL for VS, and the MySql.Data components in your project.
This happens to me when MySQL version is updated.
I have found that doing the following steps can solve it:
Update the project nuget packages for MySQL to the latest.
Close Visual Studio.
Lunch MySQL Installer and update the product ".Net Connector" to the latest.
In MySQL Installer - remove the product "MySQL for Visual Studio"
In MySQL Installer - reinstall the product "MySQL for Visual Studio"
When you will open Visual Studio and update your model, you will be asked to update some MySQL files from PKGDEF files. Click on yes and everything should work.