Can't add reference to Oracle.DataAccess in VS2008 project on Windows XP
I'm experiencing a very frustrating problem that I'm hoping someone can help me with. Originally ODP.NET was installed on my system with the Oracle Express Client. In VS2008 I could add a reference to Oracle.DataAccess using the .NET tab of the Add Reference dialog. Things worked great.
Unfortunately, everyone else on our development team installed ODP.NET using the latest ODTwithOCAC1020221.exe file. Since we are all working on a shared project they would have to update the reference on their machine, and every time I checked out the latest version of the project from our TFS server, I'd have to update the reference. Total pain . . .
So I uninstalled the Oracle Express Client on my system and installed ODP.NET using the same executable everyone else used. The problem I have now is that Oracle.DataAccess no longer shows up as a choice under the .NET tab of the Add Reference dialog.
I have verified that Oracle.DataAccess is in the GAC. I have also manually run gacutil to make sure it was installed without any problems. But no joy, it just doesn't show up in the dialog box to allow me to add it.
Any suggestions?
Yes, I know I can set a reference to it via the file system. The problem comes in somewhere in the unit tests. Even though the reference is there and everything compiles, the unit tests fails because they can't find the reference in the GAC.
Originally when I had the express client installed I was able to add a reference to it using the .NET tab of the Add Reference dialog box in VS2008. After uninstalling the express client and installing the latest version it no longer shows up under the .NET tab which tells me that VS2008 doesn't see it in the GAC. Even though it is there.
It's in the GAC. I can open the assemblies folder on my system and see it in the GAC. I can use gacutil to remove it and reinstall it without any problems. I can create a file reference to it by browsing to the installed location of the dll. But because VS2008 doesn't recognize it in the GAC, my unit tests never find it.
This is very frustrating. My work around for now is to use the MS Oracle driver.
Similar Messages
-
From where i can download complete Reference about oracle interMedia
can any one tell me from where i can download complete reference about Oracle
InterMedia i want to work on DocumentManagement in Oracle
ThanxIt is part of the Oracle Database documentation set.
http://www.oracle.com/technology/documentation/database10gr2.html -
How can I add an existing cfm page to a project?
CFB3 Question: How can I add an existing cfm page to a project? I created a project and copied a file into the project folder but I can't seem to find a way to add the cfm file into the project.
@Carl - Well heck, yes I did... But after reading your response I went back and tried right-clicking on and refreshing different things and what worked was right-clicking on the project name in the Navigator window and then clicking on refresh in that context menu.
Thank you Carl! -
Can I add multiple linked documents to an existing project?
Can I add multiple linked documents to an existing project without breaking the project?
The project I'm working on is due to go live in just a little over a month. I've recently acquired some training materials that contain information that needs to be merged into the help file. The problem is that there is not enough time to do it, get it reviewed, and so on.
So I had this idea of linking to the Word docs (there are 3) for now, then cleaning things up as we go along.
Is that a stupid idea this late in the game?
Would it be better to create a separate help file with just those docs and then merge the projects into a master project?
I am using RoboHelp 9 and Word 2010.I don't think the idea in itself is silly but I think there might be a nicer solution.
Link the documents to a new project. How is described on my site. Alternatively import them.
Once you have got the topics looking how you want, then import them into your main project. You then have the topics ready to edit later on but for now they can go as they are.
Backup your main project before you start the import so that you can backtrack if you want to.
The TOC will not come in automatically this way but you'll likely want to add the new stuff manually anyway. Alternatively you can import the TOC and then append it.
See www.grainge.org for RoboHelp and Authoring tips
@petergrainge -
How to change assembely reference to Oracle.DataAccess in prod
Ok -
In development I installed "ODAC Entity Framework and LINQ Beta (11.2.0.2.30)" so that we could have a 32 bit version of Oracle.DataAccess for ODP.Net.
In Visual Studio 2010 (on Windows Server 2008 R2) I made a reference to:
C:\Oracle\odp.net\bin\4\Oracle.DataAccess.dll.
This adds:
<add assembly="Oracle.DataAccess, Version=4.112.2.30, Culture=neutral, PublicKeyToken=89B483F429C47342" />
to the assembly in the web.config.
We set the AppPool to Enable 32 bit applications and everything works great.
For anyone who doesn't know the story here, we do this because Visual Studio 2010 runs in 32 bit so you need the 32 bit ODAC/ODP.net components to get a development environment running.
I then publish the files and move to a 64 bit machine.
I downloaded the "ODAC112021Xcopy_x64.zip"
Then ran:
install.bat odp.net4 c:\oracle odac and I can see the Oracle.DataAccess.dll file at:
C:\Oracle\odp.net\bin\4\Oracle.DataAccess.dll.
Then added c:\oracle;c:\oracle\bin\;c:\oracle\bin\4 to the System Path.
At this point I would think I just replace the version and PulbicKeyToken in:
<add assembly="Oracle.DataAccess, Version=4.112.2.30, Culture=neutral, PublicKeyToken=89B483F429C47342" />
on production to the versioin installed on prod.
So first thing I do is just remove that line on production to see what error I will get.
And I still get the same error:
System.IO.FileLoadException: Could not load file or assembly 'Oracle.DataAccess, Version=4.112.2.30, Culture=neutral, PublicKeyToken=89b483f429c47342' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
Actually this is if I move the new dll into the applicaitons bin directory.
If I remove the dll from the directory I get:
Could not load file or assembly 'Oracle.DataAccess, Version=4.112.2.0, Culture=neutral, PublicKeyToken=89b483f429c47342' or one of its dependencies. The system cannot find the file specified.
So I put the line back in.
I right click on on the new Oracle.DataAccess.dll and click properties.
In the details tab I see verion is 4.112.2.0.
That makes sense. The 64 bit XCopy version is an earlier build then the 32 bit Beta that comes with Entity Framework and LINQ(Version=4.112.2.30).
So on production I change the Version attribute to: 4.112.2.0.
But now I get the same error:
System.IO.FileLoadException: Could not load file or assembly 'Oracle.DataAccess, Version=4.112.2.30, Culture=neutral, PublicKeyToken=89b483f429c47342' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
(This is with the new dll back in the web app's bin directory as is the rest of the thread).
It's still looking for the same version of the assembly. Why is it doing that?
The web.config has a connection string with the ODP.Net provider type (Oracle.DataAccess.Client).
Which would take from the assembly reference.
It should not care what the version number is.
Could there be something in code somewhere that is specifically looking for the old dev box version?
Just what is the way to make it use the new assembly?
I would think the system would just know where to find the new dll.
Just as in development the add reference dialog knew that the dll was in c:\oracle\... rather then c:\program files(x86)... like out-of-the-box Microsoft assemblies. Because the system knows, right?
Edited by: 842453 on Mar 7, 2011 1:17 PMHi,
The .NET runtime will always attempt to load the exact version of the ODP assembly that the application was compiled with unless you have some sort of binding redirection in place. We do provide forward redirection in the way of publisher policy files but we do not provide backward redirect, you would have to add this binding redirect to your app.config file. We generally do not recommend you redirect to use an older version although I dotn see any real reason why it shudl not work as long as you are not using any 4.112.3.0 specific features. Loading the assembly that the application was compiled with is a security thing and is the way it works.
The only thing you are doing by adding that reference to the configuration file for 4.112.2.0 is to have that preloaded by the runtime, your application is still compiled with 4.112.3.0 and expects to find that exact version unless you tell it otherwise because we only provide forward redirection when ODP gets installed.
HTH
Jenny -
Hi all,
I have an application that is working fine on windows XP. On windows 7, the same application cannot work cause of the tag oracle.dataaccess.client you can see below which is not recognized by the system. As soon as I start the application I get an error
message
Unrecognized configuration section oracle.dataaccess.client. Can someone help please before I get nuts.
<oracle.dataaccess.client>
<settings>
<add name=""EA_SERVICES"."SLI_SECURITY_PKG"."SEC_GROUPS_ADD".RefCursor.OUTPARAM" value="implicitRefCursor bindinfo='mode=Output'"/>
<add name=""EA_SERVICES"."SLI_SECURITY_PKG"."SEC_GROUP_MEMBERS_ADD".RefCursor.OUTPARAM" value="implicitRefCursor bindinfo='mode=Output'"/>
<add name=""EA_SERVICES"."SLI_SECURITY_PKG"."SEC_OBJECTS_ADD".RefCursor.OUTPARAM" value="implicitRefCursor bindinfo='mode=Output'"/>
<add name=""EA_SERVICES"."SLI_SECURITY_PKG"."SEC_RIGHTS_ADD".RefCursor.OUTPARAM" value="implicitRefCursor bindinfo='mode=Output'"/>
<add name=""EA_SERVICES"."SLI_SECURITY_PKG"."SEC_RIGHT_GROUPS_ADD".RefCursor.OUTPARAM" value="implicitRefCursor bindinfo='mode=Output'"/>
<add name=""EA_SERVICES"."SLI_SECURITY_PKG"."SEC_USERS_ADD".RefCursor.OUTPARAM" value="implicitRefCursor bindinfo='mode=Output'"/>
</settings>
</oracle.dataaccess.client>
Sherman Body loveSince this is an oracle section, I think you'll get more help over at the oracle forums.
https://community.oracle.com/community/developer/english/oracle_database/windows_and_.net/oracle_developer_tools_for_visual_studio
I would check the versions of the odp.net (oracle.dataaccess.dll) on both machines. The XP machine probably has the 11g client on it. And the windows 7 machine probably has the 12c client on it. -
Interop.ORADCLib.dll and Oracle.DataAccess.dll for 64 bit Windows Server
Sirs / Ma'ams,
Are there 64 bit versions of Interop.ORADCLib.dll and Oracle.DataAccess.dll which can be used in Windows Server 2003 and 2008?
Thanks.11.2 is beta at the moment. There is no official release date so far.
As DG4ODBC is independant from the Oracle database (or the target database) you can use a 3 machine model:
On the first machine you have your Oracle database, on a second machine running 32bit Windows you can install DG4ODBC and on the 3rd machine you can run your foreign database.
If the SQL Server 2k is installed on a 32bit Windows machine, then you can also install DG4ODBC on this machine.
In general the connection from an Oracle database to the DG4ODBC machine is done using SDQL*Net. The listener responsible for DG4ODBC will then load the DG4ODBC executable which will connect to the SQL Server using SQL Server ODBC driver. -
How can I add to the options automatically appearing in Get Info window?
Can anyone please tell me if there is a way to change the options in the Get Info window to show more of them? For example, as well as Album Name, Artist, Composer, Genre, date I'd like to have Grouping and Comment come up each time. At the moment, for each album I import I have to go to Edit>View Options and then add them. It is getting to be a drag. I tried ticking them in Library>Show Columns but that doesn't seem to bring them up in the Get Info window. And yes, I do regularly want to add the same comment to every track on the album!
Powerbook G4 12 Mac OS X (10.4.6)Mike,
Thank you, your info has been very helpful and I think I have followed you (wouldn't it be nice if English were less vague?) - selecting multiple items had me a little stumped - do you mean that I go to, say, Library, and highlight an album and then CMD-I means I that exactly all the things I wanted come up? I did this a few times and it works fine. But I'm not sure if that is actually what you meant. Maybe there is another way of selecting multiple items that I haven't yet cottoned on to? You can tell I'm not very good at this, I really appreciate your help. -
How can I add a new task to an online project from outlook
At the moment, I can see tasks in outlook.
I can modify them.
But cant add a new one. Seems strange behaviour.Hi Dave TQM,
You cannot (that is add a new task to Project Online from Outlook).
You need to edit the task in Project Online or Project Pro.
Ben Howard [MVP] | web |
blog |
book | P2O -
How can I add music to an Apple-formatted iPod from a Windows-PC?
without losing the music that I already downloaded from an iMac?
When I try connecting the iPod to my Windows PC, it prompts me to restore, which would eliminate all the music that's already on the iPod.
Any way around that?If your iPod is formatted for Mac it won't run natively on a PC because Windows operating systems don't recognize Mac OS-formatted disks (HFS or HFS Plus formats). However there are third party programs that will allow you to use a Mac formatted iPod on Windows. XPlay and MacDrive for instance get good reviews. XPlay is an iPod specific program and can be used as an iTunes alternative, MacDrive is more general and lets you access various types of Mac formatted drives on Windows such as CDs, DVDs, hard drives etc:
XPlay 2
MacDriveiPod on Mac and Windows -
How can I add an external com libraries to the project
Some exported files that I'm using has
package com.heaton.bot
How do I add this package to JDeveloper 9.0.3.4?In your project (double click the project in the System Navigator pane) you have the ability to add directories to your class path or source path. Configurations->Development->Paths for .class and Common->Input Paths for .java.
-
How can I add comments in genius bar reservation after closing the window?
I was typing my additional comments in the genius bar reservation for servicing my Macbook Pro but i accidentally closed the window. Is it possible to get back to the reservation window and type in my comments??
Thanks a lot.Call the Apple store where you are having your computer serviced. Give the comments over the phone.
-
Unable to load Oracle.DataAccess
Hi ,
I have created a website project on .net framework 4.0 in Visual Studio 2010 . But I am unable to add reference the Oracle.DataAccess dll. It is continously throwing the error " unable to load assembly Oracle.DataAccess . The system cannot find the file specified. "
But when I tried adding the reference in a web application project , it gets added. But when run the project it is throwing the same error. On the web page the error thrown is this :
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
Assembly Load Trace: The following information can be helpful to determine why the assembly 'Oracle.DataAccess' could not be loaded.
=== Pre-bind state information ===
LOG: User =***********
LOG: DisplayName = Oracle.DataAccess
(Partial)
WRN: Partial binding information was supplied for an assembly:
WRN: Assembly Name: Oracle.DataAccess | Domain ID: 2
WRN: A partial bind occurs when only part of the assembly display name is provided.
WRN: This might result in the binder loading an incorrect assembly.
WRN: It is recommended to provide a fully specified textual identity for the assembly,
WRN: that consists of the simple name, version, culture, and public key token.
Stack Trace:
[BadImageFormatException: Could not load file or assembly 'Oracle.DataAccess' or one of its dependencies. An attempt was made to load a program with an incorrect format.]
System.Reflection.RuntimeAssembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks) +0
System.Reflection.RuntimeAssembly.nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks) +39
System.Reflection.RuntimeAssembly.InternalLoadAssemblyName(AssemblyName assemblyRef, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection, Boolean suppressSecurityChecks) +132
System.Reflection.RuntimeAssembly.InternalLoad(String assemblyString, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection) +144
System.Reflection.Assembly.Load(String assemblyString) +28
System.Web.Configuration.CompilationSection.LoadAssemblyHelper(String assemblyName, Boolean starDirective) +46
Any help on this , please.. I have been trying all sorts of things and nothing seems to workl.BadImageFormatException occurs when you have a bit mismatch.
1) What is the TargetCPU set to when you compiled?
2) Are you running the app on 32 bit or 64 bit OS?
3) Confirm whether the app is running as 32 bit or 64 bit in the problem environment (open task manager, click the process tab, is there a *32 next to the name?)
4) Did you install 32 bit Oracle client or 64 bit Oracle client?
Cheers,
Greg -
Oracle.DataAccess.Client - DbProviderFactories.GetFactory
Hello
I was inspired by this article http://www.oracle.com/technology/oramag/oracle/06-winsupp/win06odp.html
And been trying to switch my project over from "System.Data.OracleClient" (seems like it's not friendly with TransactionScope) to ODP.NET "Oracle.DataAccess.Client". I failed from get go:
Code:
DbProviderFactory oDbFactory = DbProviderFactories.GetFactory("Oracle.DataAccess.Client");
Keep getting System.Configuration.ConfigurationErrorsException saying:
+"Failed to find or load the registered .Net Framework Data Provider."+
In my futile attempt to resolve this:
STEP 1: In machine.config
* Under \\configuration\configSections\, *add:
<section name="oracle.dataaccess.client" type="System.Data.Common.DbProviderConfigurationHandler, System.Data, Version=2.0.0.0, Culture=neutral, PublicKeyToken=89b483f429c47342" />
* Under ..\system.data\DbProviderFactories\, *add:
<add name="Oracle Data Provider for .NET" invariant="Oracle.DataAccess.Client" description=".Net Framework Data Provider for Oracle" type="Oracle.DataAccess.Client.OracleClientFactory, Oracle.DataAccess, Version=10.2.0.100, Culture=neutral, PublicKeyToken=89b483f429c47342" />
STEP 2: I checked my assembly cache it's there:
Code:
D:\Program Files\Microsoft Visual Studio 9.0\VC>gacutil /l | findstr Oracle
System.Data.OracleClient, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77
a5c561934e089, processorArchitecture=x86
CoreLab.Oracle, Version=3.50.12.0, Culture=neutral, PublicKeyToken=09af7300eec
+23701, processorArchitecture=MSIL+
Oracle.DataAccess, Version=10.2.0.100, Culture=neutral, PublicKeyToken=89b483f
+429c47342+
Oracle.DataAccess.resources, Version=10.2.0.100, Culture=de, PublicKeyToken=89
b483f429c47342
Oracle.DataAccess.resources, Version=10.2.0.100, Culture=es, PublicKeyToken=89
b483f429c47342
Oracle.DataAccess.resources, Version=10.2.0.100, Culture=fr, PublicKeyToken=89
b483f429c47342
Oracle.DataAccess.resources, Version=10.2.0.100, Culture=it, PublicKeyToken=89
b483f429c47342
Oracle.DataAccess.resources, Version=10.2.0.100, Culture=ja, PublicKeyToken=89
b483f429c47342
Oracle.DataAccess.resources, Version=10.2.0.100, Culture=ko, PublicKeyToken=89
b483f429c47342
Oracle.DataAccess.resources, Version=10.2.0.100, Culture=pt-BR, PublicKeyToken
+=89b483f429c47342+
Oracle.DataAccess.resources, Version=10.2.0.100, Culture=zh-CHS, PublicKeyToke
n=89b483f429c47342
Oracle.DataAccess.resources, Version=10.2.0.100, Culture=zh-CHT, PublicKeyToke
n=89b483f429c47342
Policy.9.2.Oracle.DataAccess, Version=10.2.0.100, Culture=neutral, PublicKeyTo
ken=89b483f429c47342
See, I'm sure the assembly has been installed and in machine.config I used the right key/version. Weird thing is, Red Gate's reflector won't allow me to "Open" (from Cache) the dll, this prevented me to check if there exists "Oracle.DataAccess.Client.OracleClientFactory" within the assembly. So I select "Copy Local" and examined the dll from "Red Gates Reflector". There's no "Oracle.DataAccess.Client.OracleClientFactory" in the dll ???
RedGates Reflector - Screencap:
http://www.codeguru.com/forum/showthread.php?p=1831221#post1831221
STEP 3. Somebody advised to check and make sure "msvcr71.dll" is found under "ORACLE_HOME\bin" and if not copy from "D:\WINDOWS\system32". I did, it's ALREADY there.
REF:
http://www.oracle.com/technology/ora.../win06odp.html
http://social.msdn.microsoft.com/For...7-92c63ac82144
http://forums.oracle.com/forums/thre...89702�
Edited by: devvvy on Apr 9, 2009 2:57 AMThanks just installed from http://www.oracle.com/technology/software/tech/dotnet/utilsoft.html
It seems version is "2.111.6.20" - from machine.config there's a new line
<add name="Oracle Data Provider for .NET" invariant="Oracle.DataAccess.Client" description="Oracle Data Provider for .NET" type="Oracle.DataAccess.Client.OracleClientFactory, Oracle.DataAccess, Version=2.111.6.20, Culture=neutral, PublicKeyToken=89b483f429c47342" />
i added reference to it from Visual Studio. It's working now.
There were two options: one for client, the other for server. I don't understand what it means but stick to "Client" which was the default. Is this okay?
At the end there was a reminder "Run Oracle Providers for ASP.NET SQL scripts located in D:\OracleODPNET\ASP.NET\SQL directory."
Anyway, I'm verrrry glad this is working now many thanks!!! (I feel like 10 years older) -
Hello Everyone,
I am simply trying to insert into an oracle database table. When I try to run the insert from my visual studio program after a button is clicked the program stops and I get "Could not load file or assembly 'Oracle.DataAccess, Version=4.112.4.0" error.
Why is this? I have added the reference and put "using Oracle.DataAccess;" in the file. The code is below. Any suggestions?
OracleConnection Con = new OracleConnection(ConfigurationManager.ConnectionStrings["ConnectionString1"].ToString());
OracleCommand sqlCmd = new OracleCommand();
//OracleDataReader dr;
sqlCmd.Connection = Con;
Con.Open();
sqlCmd.CommandText = "INSERT INTO FGID values (0, 0, 0, ' ', sysdate)";
sqlCmd.ExecuteNonQuery();
sqlCmd.Clone();
MessageBox.Show("Record Inserted!");
M.N.Hi Boa_nerges,
>>Could not load file or assembly 'Oracle.DataAccess, Version=4.112.4.0" error.
Whether all projects have the same issue?
Please make sure that it is not the platform target issue in your project property. Or the setup version issue.
Reference:
https://social.msdn.microsoft.com/Forums/en-US/9827bb73-a58b-415d-ad93-8e08f3a1258b/need-urgent-help-could-not-load-file-or-assembly-39oracledataaccess-version411220?forum=csharpgeneral
http://forums.asp.net/t/1661229.aspx?How+to+change+assembely+reference+to+Oracle+DataAccess+in+prod+
In addition, if still no help, since the oracle is the third party tool, I suggest you post this issue to the Oracle forum:
https://community.oracle.com/community/database
Best Regards,
Jack
We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
Click
HERE to participate the survey.
Maybe you are looking for
-
Why have "All Day" events moved forward by 24 hours when syncing from my iPhone to iMac?
When I syncd my calender from my iPhone 3Gs to iMac for the first time, it moved all the events entered as "all Day" forward by 1 day on iCal. It didn't do that to events with a set start and finish time on a day.I have checked the date/time settings
-
Error when burning data dvd after installing 7.3.2.6
Making a data backup of a playlist of about 400 songs. Around 6 songs have the exclamation point with the error message "The song could not be used because the original could not be found. Would you like to locate it?" I located the originals and the
-
I've lost the orange firefox tab with the arrow, that was in the top left corner: how do I get it back?
-
Adobe and large 16 bit files scanned from 35mm
Just noticed that Adobe Photoshop does better Auto job of the above file type that Lightroom. Has anybody noticed this or does Lightroom not really support 16bit properly. PS it rejects files larger than 150mb by the way. Thanks in advance
-
Problems with admin console in firefox 4 and chrome 10
I am experiencing problems when accessing the admin console with firefox 4.0 or chrome. Apparently this came up after i switched to firefox 4.0. Symptoms: In many admin screens the detailed information is missing. e.g. the list of SGD servers is not