I have the following installed:
VS 2013
Oracle 11g database
Oracle Developer Tools for VS 2013 12.1.2400
ODP.NET 12.1.2400
EF 6
After I add or select a new connection when adding a new ADO.NET Entity Data Model, I get an "Object reference not set to an instance of an object" error and am not able to add a new model.
This was previously working when I had the DevArt Oracle client installed (although I wasn't using it). After I uninstalled the DevArt components I started to get this error.
I have since uninstalled and re-installed the Oracle developer tools and ODP.NET but still get the same error.
I am able to connect to the Oracle database via the Server Explorer within VS.
Any ideas? It's driving me mad.
I decided to give up on VS 2013 and installed VS 2015 which I was planning on doing anyway.
In VS 2015 I got the same "Object reference error" when trying to add a new project. I found this thread: Error message "No exports were found that match the constraint contract name" which had the solution for that.
I installed the Oracle Developer Tools for VS 2015 (the MSI version) and it's working. Still not working in VS 2013, but I will just abandon it.
I suspect uninstalling the Devart component caused this issue.
Related
I am using VS 2017, ODAC for VS 2017, and Oracle.ManagedDataAccess 12.2.1100 (and its corresponding EF dll), and EF 6.4.
The database is 18c Express, and is running on a virtual machine.
When I had gone to generate the model, first I had troubles creating the connection string, something I fixed setting the SQLNET.AUTHENTICATION_SERVICES= (NONE) in the sqlnet.ora, and then, on the next step, the wizard crashes. It just briefly displays a radio button "Entity Framework 6" and then exits.
The wizard creates no issues when I generate a model from the local Oracle11g Express Database, and also I haven't needed to change the sqlnet.ora for it to work.
Should I try with different versions of ManagedDataAccess, or is this something else?
Updating ODAC to 18.3 made it work with both databases.
I have Visual Studio Professional 2015 running a newly created WebAPI 2 project. I wanted to create a data model from database using entity framework (code first from existing database). So I downloaded this from oracle.
ODAC 12.2c Release 1 and Oracle Developer Tools for Visual Studio (12.2.0.1.0)
After installation I successfully tested connected to the database using Managed driver, and proceed through the EF wizard. But at the end I get this error
I tried both Managed and Unmanaged drivers. I also tried adding references to these libraries
Oracle.ManagedDataAccess
Oracle.ManagedDataAcces.EntityFramework
Oracle.DataAccess.EntityFramework
Oracle.DataAccess
I check my version of Entity Framework the project is using and it says its using the latest 6.1.3
After adding this references from Nuget:
Oracle.ManagedDataAccess
Oracle.ManagedDataAccess.EntityFramework
Oracle.DataAccess.EntityFramework
Oracle.DataAccess
You have to compile the project in x86 and try again with the wizard. We have had your problem at my office several times, and I think It´s caused because of having the project configured with "any Cpu"
Hope it helps
I have installed Oracle Developer Tools for Visual Studio 2017. I am now finally able to create my database classes within VS2017 without switching back to VS2015.
After the installation I am getting the following error message upon opening an old project and also when creating a new Oracle database connection (in a new project) in Visual Studio 2017:
oracle data provider for .net has been installed without a
machine-wide configuration
(...) Also found anoher version in the GAC that might be incompatible, please uninstall it and restart VS2017
(Poorly translated the german message to english, but you get the point)
Problem is: The version in my GAC is the newer version needed for VS2017. I definitly do not want to uninstall that, but the non machine wide data provider from earlier. I can't find anything about how to do that. Do you guys have any ideas?
Please forgive me if my attempt itself is not smart at all => I haven't installed Oracle Tools for VS before and ran into loads of problems doing so earlier.
Just for the record: I have been trying to google for a solution, but I did not manage to find one. If you got the key-Keywords let me know-
I installed this Version from 6th july 2017
Oracle Developer Tools for Visual Studio 2017 (12.2.0.1.0)
This download includes:
Oracle Developer Tools for Visual Studio 12.2.0.1.0 Oracle Data
Provider for .NET 4, Managed Driver 12.2.0.1.0 Oracle Providers for
ASP.NET 4 12.2.0.1.0
I did a lot of installing of the Oracle tools before getting it to work. Not an expert, but I found many installations of my "Oracle Home". In order to uninstall versions that I did not want, I used the Oracle Universal Installer. This is found (for Windows 7) in "Start Menu -> All Programs -> Oracle-Ora Client-your specific client -> Oracle Installation Products.
Run the installer and choose which oracle home you want to uninstall. You should be able to determine which one is the one that you want to uninstall by looking at Registry Keys, HKLM->Software->Oracle. Also HKLM->SOFTWARE->Wow6432Node->ORACLE. There may be others, search for Oracle keys.
SO figure out which oracle home you want to uninstall and use the Universal Installer to remove it. This should preserve the installation that you want and remove the one you don't. I'm not an expert, just offering what has worked for me.
In Visual Studio 2017, when I create new connection (using the wizard), there is a hard-coded path to a TNSNAMES.ORA file, that can't be changed through the wizard. It is set up through the above-mentioned registry keys. This is key to mapping your Data Source to an actual database. Hope this is helpful.
I am setting up VS 2013 for development with Azure SQL Database (I am new to Azure). I have set up a database on Azure and a Solution on VS 2013. The local machine is Windows 8.1 Pro, with SQL server 2014 Express. I am trying to import the database on Azure into the VS solution. I have changed the Target platform on VS to “Microsoft Azure SQL Database”. I have checked that VS can see the Azure database by using “Test Connection” – all appears well.
When I start the Import Database, I get the following error:
You cannot import a 1025 database because you project’s target platform is set to 130. To learn more about changing your target platform and/or source database, or the supported database editions for specific target platforms, please refer to Import Schema help page.
I cannot find the help referred to in the error message. I have tried changing the target to SQL server 2014, no joy. Can anyone give me some pointers?
This issue could be SSDT version issue. Can you download and install the latest RTM or Preview version of SSDT from https://msdn.microsoft.com/en-us/library/mt204009.aspx
If you need to try out all GA and Preview features of Azure SQL DB, SSDT Preview would cover it. Otherwise SSDT RTM version will provide the stability.
For this:
Created the SQL project
Set target to Azure SQL
Instead of "Import" did "Synchronize"
The numbers refer to they type of sql installation, with 130 being 2014, and 1025 being the azure cloud. Exporting data from azure is a little more complicated than you would expect with a VM, because of the way SQL Azure works behind the scenes. First to literally answer your question here is the link to how to use the import export services so you can get the DB on your local 2014 install. However I imagine what you want to do is actually develop for that server without some painful import export process, which is why I think this link that talks about what tools to use might be more helpful.
Anyway, good luck, SQL azure is very much a product in it's infancy.
I was able to work around the problem by working from VS 2013 and creating the Db in VS and publishing to Azure following the tutorial:
https://azure.microsoft.com/en-us/documentation/articles/web-sites-dotnet-get-started/
I hope I will not need to import a Db in the future!
Thank you to all those that edited & answered. I hope to be able to return the favour.
Importing from Azure into a Sql Server Project works in Visual Studio 2015 with no issues.
Visual Studio 2012 comes with SQL Server Compact 4.0. I have installed SQL Server Compact 3.5 from http://www.microsoft.com/en-GB/download/confirmation.aspx?id=5783 However I still only have the option of making a new data connection to a SQL Server Compact 4.0 file, whereas the files I need to get data from are SQL Server Compact 3.5 files.
Is it possible to connect to a SQL Server Compact 3.5 file as a data source in Visual Studio 2012? If so which settings or installs should I need?
Over in a thread I started on SQL Server Developer Center > SQL Server Forums > SQL Server Compact Ray Chen has posted an answer:
Unfortunately, SQL Server CE 3.5 is not supported in VS 2012 indeed.
You have to upgrade the SQL Server CE 3.5 database to 4.0 as Erik
suggested [link added]. Also please take a look at this article: Visual Studio
2012
Compatibility.
In the section of ‘These Assets Need Your Attention’, it says: One-way
upgrade. You must upgrade these assets before you can open them in
Visual Studio 2012. After you upgrade, you won’t be able to open them
in previous versions. The following table lists the project types,
file types, and technologies that you must upgrade. And SQL Server CE
3.5 is included in the table.
I've posted a subsidiary question there to find out how, given that I cannot read in the file, I would convert it to SQL Server Compact 4.0.
=========== EDIT ==========
Ray Chen went on to post references to ErikEJ's blog post HOW TO: Upgrade a version 3.x database file to SQL Server Compact 4.0 and to the SqlCeEngine.Upgrade Method (String) library page.