none
What oracle download did you install for windows 7 64 bit development? RRS feed

  • Question

  • I have oracle 10g r2 running on my server 2003 box.
    I have been through every combination I can think of as far as oracle downloads for my windows 7 development box.

    I copied a project from work and took it home. I also have windows 7 64 bit at work and the project works fine there.

    When I run it at home I get the badimageformat exception as soon as I hit an oracle call.

    So, I tried several things, all failing.
    I installed 64bit oracle client
    I installed Oracle ODPwithODAC
    I tried changing my referenced assemble from System.Data.OracleClient to Oracle.DataAcess.Client.

    Every option I try is unsuccessfull.
    I either get the bad image format exception for the oracle dll, or for my data access library even when they are all configed as 32 bit,  or visual studio complains it can't the referenced assembly at a path where the referenced assemby is. I checked the path, its there.

    I am so frustrated with Oracle development in VS.

    Add on top I have to totally recreate my dataset everytime I go and change a client, because the designer code seems to generate differently depending on what oracle assembly you referenced.

    -------
    Here is a step by step when I start fresh

    Copy my zipped archive from work and uncompress
    Download and install ODTwithODAC1110720 from Oracle's site ->Software Downloads
    Open Visual Studio 2008
    Add a connection in server explorer to my database, it succeeds and tables are viewable.
    Open my solution from work.
    Rebuild
    Debug

    BadFormatException on Oracle dll

    OK
    Change referecences and using System.Data.OracleClient to Oracle.DataAccess.Client.
    Rebuild
    9000 DataSet designer errors.

    OK.
    Create a new data set
    Drag and drop my table from server explorer over
    Copy between my old dataset and my new dataset every single query
    Delete old dataset
    Rename new dataset to the same name as old
    Rebuild
    Debug

    Could not load file or assembly 'Oracle.DataAccess, Version=2.111.7.20, Culture=neutral, PublicKeyToken=89b483f429c47342' or one of its dependencies. The system cannot find the file specified.

    Damnit.
    Go back to my solution explorer, open references for my library, choose Oracle.DataAcess and look at properties
    The Path given is E:\app\cpisz\product\11.1.0\client_1\ODP.NET\bin\2.x\Oracle.DataAccess.dll
    Bring up Windows Explorer
    Enter the path
    The dll is there and it is named correctly.

    ARG!
    Change from AnyCPU to x86
    Rebuild
    Debug

    System.BadImageFormatException: Could not load file or assembly 'file:///C:\Users\cpisz.HOMENETWORK\Documents\Source Control\Services\DataService\DataTransport\bin\x86\Debug\DataTransport.dll' or one of its dependencies. An attempt was made to load a program with an incorrect format.
    File name: 'file:///C:\Users\cpisz.HOMENETWORK\Documents\Source Control\Services\DataService\DataTransport\bin\x86\Debug\DataTransport.dll'
       at System.Reflection.Assembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, Assembly locationHint, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection)
       at System.Reflection.Assembly.InternalLoad(AssemblyName assemblyRef, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection)
       at System.Reflection.Assembly.Load(AssemblyName assemblyRef)
       at Microsoft.Tools.SvcHost.ServiceHostHelper.LoadServiceAssembly(String svcAssemblyPath)

    So now my library that you are supposedly compiling as x86 isn't x86?

    Check paths, yes everything is there.
    Write on forums in desperation while hating .NET more and more everyday.








    Saturday, January 30, 2010 6:25 PM

Answers

All replies

  • I suggest you bring this question to forums.oracle.com. I don't think experience in ADO.net DataSets can help on your question.

    The following is signature, not part of post
    Please mark the post answered your question as the answer, and mark other helpful posts as helpful.
    Visual C++ MVP
    Saturday, January 30, 2010 9:08 PM
  • Should they move http://msdn.microsoft.com/en-us/library/77d8yct7.aspx to Oracle's documentation too?
    That is the documentation that I am following, and the documentation that is failing. It is listed under ADO.NET in MSDN, so I figured I'd ask in the ADO.NET forums.

    It tells me to Install "Oracle Client". It does not say which of the multiple varieties to install, nor does it mention 32 bit and 64 bit differences, nor does it mention the difference between a client install and an ODTwithODAC install.

    -----

    Oracle works fine outside of ADO.NET.

    I can connect and query using the command line tools in Oracle.
    I can even run already built Oracle apps.

    The problem is not Oracle, it is a matter of setting up an environment for Visual Studio 2008 and ADO.NET

    People in the Oracle Forums have no idea what it means when a strongly typed dataset is giving errors after changing the oracle client assembly....
    They also don't give two hoots that Visual Studio is a 32 bit application and wants a 32 bit assembly for its design tools, yet needs 64 bit assembly to build 64 bit apps, with no way to direct it to one or the other (or at least I am assuming that is my problem).

    I would think anyone whom has made a ADO.NET application on Windows 7 using an oracle database would be familiar with all of the above problems and be able to suggest a fix.




    Saturday, January 30, 2010 9:33 PM
  • That documentation is about System.Data classes, not the Oracle.DataAcess.Client classes. Your question is a matter of setting up ODP.Net on 64bit PCs for Visual Studio, which I think is covered by the ODP.Net forum on the web site. I don't think people who want to help others on ODP.Net setup and configuration would expect such questions to be raised frequently enough in a ADO.Net forum and patrol here.

    It is weekend. Forum traffic is slow. You may have better luck in business days. Microsoft support engineers patrol forums in business hours, I am not sure how oracles forums are monitored. If your issue is urgent, call Oracle customer support. 


    The following is signature, not part of post
    Please mark the post answered your question as the answer, and mark other helpful posts as helpful.
    Visual C++ MVP
    Saturday, January 30, 2010 9:47 PM
  • System.Data classes do not work without an Oracle Client installed.
    My question is about getting anything to work at all, not about ODP.NET.

    Sunday, January 31, 2010 1:13 AM
  • you can try recompiling your application as x86 (not sure why it won't jit as x86 code for Visual Studio, isn't your code targeting AnyCPU?) would make the application work in the 32bit Visual Studio. (assuming that you have a 32-bit oracle client installed on x64 box). I don't think Visual Studio has a 64bit version, but with the introduction of 64bit Office and Sharepoint server 2010 there could be 64bit support in Visual Studio designers and debuggers even when the host is 32bit. 

    The following is signature, not part of post
    Please mark the post answered your question as the answer, and mark other helpful posts as helpful.
    Visual C++ MVP
    Sunday, January 31, 2010 1:39 AM
  • you can try recompiling your application as x86 (not sure why it won't jit as x86 code for Visual Studio, isn't your code targeting AnyCPU?) would make the application work in the 32bit Visual Studio. (assuming that you have a 32-bit oracle client installed on x64 box). I don't think Visual Studio has a 64bit version, but with the introduction of 64bit Office and Sharepoint server 2010 there could be 64bit support in Visual Studio designers and debuggers even when the host is 32bit. 

    The following is signature, not part of post
    Please mark the post answered your question as the answer, and mark other helpful posts as helpful.
    Visual C++ MVP

    Tried that. Last paragraph of original post.
    Sunday, January 31, 2010 4:41 PM
  • Hello Christopher,

     

    I can understand that the situation is quite annoying.  Let's work together!

    First, I think the document that you refer to is correct, however, I am not sure whether it also fits to Windows 7 64bit OS since Windows 7 is a new product.  Besides, have you installed all the necessary 64-bit Oracle 10g data access components?  http://www.oracle.com/technology/software/tech/windows/odpnet/64-bit/index.html  Any errors during the installation process?

     

    Also, you have mentioned that the product is working fine in your Windows 7 64bit at work, right?   Do you installed any additional components or driver in your working machine?  Is the product built as x86 or Any CPU in your working machine?   To be honest, I have little experience on Oracle data access programming, so I recommend you also consult this problem in Oracle supporting channel, like http://www.oracle.com/us/community/index.html.  

     

    Hope you have a nice day!

     

    Best Regards,
    Lingzhi Sun

    MSDN Subscriber Support in Forum

    If you have any feedback on our support, please contact msdnmg@microsoft.com

     

     

     


    Please remember to mark the replies as answers if they help and unmark them if they provide no help.
    Welcome to the All-In-One Code Framework! If you have any feedback, please tell us.
    Monday, February 1, 2010 5:59 AM
    Moderator
  • Hello Christopher:

    AFAIK, one thing you shall do is to check at the DB configuration at your work. Check the PC there as well, and try to apply the same method in your PC at home.

    A quick note: This is of course a Microsoft® Forum, and we only help with issues related to Microsoft® Products.  

    I do not think that it matters whether something is x86 or x64, of course there appear some differences, however, in regular desktop programs there do not appear huge differences and the differences only impact “program functionality” – which means that a specific software do not work on a x86 since it is re-compiled to a x64 environment. The only solution is to pick something in the middle which is cross-compiled exe.

    But for Oracle® products there might be a range of different editions and each edition contains an amount of different cool features.

    I do not have that much experience with Oracle®, in fact very little; however, my best suggestion is that you shall check out the links below:

    http://www.oracle.com/technology/obe/hol08/dotnet/getstarted-c/getstarted_c_otn.htm
    http://www.oracle.com/technology/tech/windows/odpnet/faq.html (FAQ Recommended).
    http://www.oracle.com/technology/tech/windows/odpnet/index.html
    http://www.oracle.com/technology/pub/articles/cook_dotnet.html
    http://www.oracle.com/technology/products/applications/policy-automation/tutorials/OPA10%20Tutorial%20Determinations%20Server%20Clients%20dot%20NET.pdf
    http://wiki.oracle.com/thread/2908765/Oracle+support+for+the+ADO.NET+Entity+Framework (Oracle Support for ADO.NET Entity Framework).
    http://blogs.msdn.com/adonet/archive/2009/06/15/system-data-oracleclient-update.aspx (ADO.NET Team Blog).
    I hope this helps…

    Have a nice day…

    Best regards,
    Fisnik


    Coder24.com
    Monday, February 1, 2010 6:36 AM
  • Hello Christopher,

     

    I am writing to check the status of the issue on your side.  Would you mind letting us know the result of the suggestions? 

     

    If you need further assistance, please feel free to let me know.   I will be more than happy to be of assistance.

     

    Have a nice day!

     

     

    Best Regards,
    Lingzhi Sun

    MSDN Subscriber Support in Forum

    If you have any feedback on our support, please contact msdnmg@microsoft.com


    Please remember to mark the replies as answers if they help and unmark them if they provide no help.
    Welcome to the All-In-One Code Framework! If you have any feedback, please tell us.
    Wednesday, February 3, 2010 1:02 AM
    Moderator
  • Oracle forums claim it is MS's fault, although I didn't speak to anyone representing Oracle themselves as I don't have a support ID.
    The VS IDE is 32 bit, yet 64 bit applications require 64 bit.
    You can install multiple oracle homes, with multiple clients and .dlls. However, Visual Studio does not provide an easy means of choosing which .dll to use for its IDE tools.

    The managed .dlls are using native code.

    I've found everything from suggested registry hacks, to using corflag.exe , to installing a 32 bit home, a 64 bit home, and an ODP home, in different orders.

    Currently I installed a 64bit client, which has to be 11 or above for vs 2008 evidently.
    Then I installed a 32 bit client in another home for my 32 DBA commercial apps.
    Then I installed the 32 bit ODP in yet another home.

    It seems the registry keys reflect the last install you did so they had to be in order. So now VS uses the 32 bit ODP.
    I can only build 32 bit apps, but that's life until Visual Studio becomes a 64 bit IDE, so its tools can use the same .dll as your code does.

    There are further problems though, as VS seems to hang often using the Oracle.DataAcess provided when adding queries to datasets.
    It has frustrated me to the point I refuse to use any VS designer tools at all. I've made the same datasets and queries probably 50 times over now.

    After all that I find out VS 2008 comes with yet another 32/64bit problem, The WcfSvcHost.exe it comes with will not work in a x86 project.
    So, I had to use corflag.exe on that too.

    After all that, I ended up with an environment that requires a page of notes and a backup just to write a windows service for data access to oracle.







    Wednesday, February 3, 2010 3:48 AM
  • Well, well, AFAIK, a x86 Visual Studio® has support to compile 64-bit exe files. 
    A x64 CPU is backward compatible and has the support to run x86 programs.
    If you install a Windows® 7 64-bit on one of your PCs, you'll directly see the
    Program Files (x86) folder. You also have a 64-bit Registry and you have the
    WOW64 implementation as well.

    WOW64 is a x86 emulator which allows 32-bit
    Windows®-based applications to run in a x64 Environment.

    Anyway, I think that the right direction would be this:
    WOW64 implementation.

    For the Oracle® issue please contact Oracle® by e-mail.
    http://www.oracle.com/us/support/index.htm

    For further reading
    WOW64 Implementation Details

    For memory consumption questions.
    Performance and Memory Consumption Under WOW64

    I hope this helps...

    Have a nice day...

    Best regards,
    Fisnik
    Coder24.com
    Wednesday, February 3, 2010 7:03 AM
  • Your link to email Oracle goes nowhere without a support ID.
    Wednesday, February 3, 2010 8:18 AM
  • Your link to email Oracle goes nowhere without a support ID.

    http://www.oracle.com/us/corporate/contact/index.htm

    Phone numbers:

    United States Technical Support
    +1.800.223.1711

    Please contact them by phone for technical questions...


    Coder24.com
    Wednesday, February 3, 2010 9:38 AM
  • Hi Christopher,

     

    Is it work fine on your home machine now?   As I said in my last post, I have little experience on Oracle.  But from your description, I know that it could be really complicated to config Visual Studio to work with Oracle database.  I would recommend you send some suggestions on Microsoft Connect to report this problem.  If it is convenient, please share the suggestion ticket link here to benefit more community members.  Thanks a lot!

     

    Have a great day!

     

     

    Best Regards,
    Lingzhi Sun

    MSDN Subscriber Support in Forum

    If you have any feedback on our support, please contact msdnmg@microsoft.com


    Please remember to mark the replies as answers if they help and unmark them if they provide no help.
    Welcome to the All-In-One Code Framework! If you have any feedback, please tell us.
    Wednesday, February 3, 2010 9:41 AM
    Moderator
  • Hi Christopher,

     

    How is the problem now?   If you need any further assistance, please feel free to let me know.

     

    Have a great day!

     

     

    Best Regards,
    Lingzhi Sun

    MSDN Subscriber Support in Forum

    If you have any feedback on our support, please contact msdnmg@microsoft.com


    Please remember to mark the replies as answers if they help and unmark them if they provide no help.
    Welcome to the All-In-One Code Framework! If you have any feedback, please tell us.
    Monday, February 8, 2010 2:20 AM
    Moderator
  • Hi Christopher,

     

    How is the problem now?   If you need any further assistance, please feel free to let me know.

     

    Have a great day!

     

     

    Best Regards,
    Lingzhi Sun

    MSDN Subscriber Support in Forum

    If you have any feedback on our support, please contact msdnmg@microsoft.com


    Please remember to mark the replies as answers if they help and unmark them if they provide no help.
    Welcome to the All-In-One Code Framework! If you have any feedback, please tell us.

    Pretty much the same. I have found no solution.
    I have to use the 32 bit client and System.Data.OracleClient instead of the ODP. I also cannot use any of the designers for risk of having to copy all my queries over again anytime a namespace or provider changes.


    Tuesday, February 9, 2010 3:15 AM
  • Hi everybody,
    I had the same problem today and i couldn't find an acceptable solution so far. 
    I am developing on a Win 7 x64 machine and using Oracle.DataAccess.Client version 2.111.7.20. My solution contains multiple projects, the funny thing is that my console project fails with either BadFormatImageException or FileNotFoundException, whereas the WebApplication runs normally. They reference the same assembly from GAC. This is weird.
    Wednesday, February 10, 2010 7:18 PM
  • Hi Christopher,

     

    As I said, I would recommend you open a suggestion ticket in Microsoft Connect to report this problem of System.Data.OracleClient.   Just for some supplement, System.Data.OracleClient will be marked as deprecated in .NET Framework 4.0.   We would recommend the customers to use ODP.NET as the ADO.NET data provider for Oracle database, http://blogs.msdn.com/adonet/archive/2009/06/15/system-data-oracleclient-update.aspx.   For ODP.NET issues, we can consult at ODP.NET forum here, http://forums.oracle.com/forums/forum.jspa?forumID=146.  

     

    Have a nice day!

     

     

    Best Regards,
    Lingzhi Sun

    MSDN Subscriber Support in Forum

    If you have any feedback on our support, please contact msdnmg@microsoft.com


    Please remember to mark the replies as answers if they help and unmark them if they provide no help.
    Welcome to the All-In-One Code Framework! If you have any feedback, please tell us.
    Thursday, February 11, 2010 12:47 PM
    Moderator
  • Hi everybody,
    I had the same problem today and i couldn't find an acceptable solution so far. 
    I am developing on a Win 7 x64 machine and using Oracle.DataAccess.Client version 2.111.7.20. My solution contains multiple projects, the funny thing is that my console project fails with either BadFormatImageException or FileNotFoundException, whereas the WebApplication runs normally. They reference the same assembly from GAC. This is weird.

    It's long time, Have you solved the problem? I've been concerned about the issue.
    Thursday, September 2, 2010 2:24 AM
  • Hi everybody,
    I had the same problem today and i couldn't find an acceptable solution so far. 
    I am developing on a Win 7 x64 machine and using Oracle.DataAccess.Client version 2.111.7.20. My solution contains multiple projects, the funny thing is that my console project fails with either BadFormatImageException or FileNotFoundException, whereas the WebApplication runs normally. They reference the same assembly from GAC. This is weird.

    It's long time, Have you solved the problem? I've been concerned about the issue.


    Yes. I can't mark my own post as the answer, but it is further up in this thread.

    You will find that it isn't really the oracle data access, but rather the IDE tools. If you are writing a 64 bit application, you run into problems because the WCF host you use in debug is 32 bit. you can use corflags.exe to flag it 64 bit. Its a process, but you can google how to do that. If you are using the designer tools in the IDE, those also cause problems, because they are 32 bit, I am unsure how to solve that though since I got so frustrated with the silly designer I don't use it anymore. Instead I just manually created my own classes and data access code. MS stands by their stance that there is no need to make Visual Studio and its tools 64 bit, but you will find that's just not true. You can work around these problems, but it is a pain and takes away from precious development time.

    If you are not using WCF or the Designer tools in the IDE, you probably have a different issue than I did.

    I installed the Oracle 11.02 64 bit client, which does work with my 10.2 database server. Flagged my project as "Any CPU", which cause everything to run 64 bit on a 64bit machine. My 32 bit clients are out of luck, as I don't want to bother installing the 32 bit data access and compiling seperatly for now. Then I ran corflags on the WCFhost.exe and it seems to work that way.

    To be fair, it is really a problem inside the development environment. But what are you going to write without needing to debug it?

    I would hypothesize(sp) that oracle used native code and visual studio also uses native code, so 64 bit and 32 bit clash. Everything seems to work fine with MSSQL if you have that option. But, my empoyer is dead set on using Oracle. MS really ought to advertise all the VS features as "MSSQL designer", rather than "database designer", as MSSQL seems to be the only DB I've used the VS features with, where I didn't have to spend a month sorting out problems. Why would they make it easy for us when MSSQL is in competition with other DBs? I am upset at the marketing though, since it is misleading.

     

     

    Thursday, September 2, 2010 3:35 AM
  • HI All,

    I had the same isseu at work. My partial solution was to go to IIS and set the application pool to allow   32bit app.

    regards,

     

    André Coimbra-Villela

    Friday, November 26, 2010 3:04 PM