locked
Unit test accessing Oracle on 64-bit platform throws ORA-12154: TNS:cound not resolve the connect identifier specified RRS feed

  • Question

  • I have an x86 application that accesses Oracle XE 10.2G without problems on 32-bit XP, Vista, and Windows 7.  It also works fine on 64-bit Vista and Windows7.

    Automated unit tests run in either Visual Studio 2010 Ultimate or Professional behave differently on 32-bit and 64-bit systems when the attempt to connect to the database.  On 32-bit platforms, they work fine.  On 64-bit platforms, they throw the exception "ORA-12154: TNS:could not resolve the connect identifier specified."  I have checked in the debugger and the same connection string is used in all cases.

    My code targets .NET 3.5, but the test projects are forced to .NET 4 by Visual Studio and cannot be changed.

    The bottom line is that the application works fine, but I cannot run unit tests in Visual Studio on 64-bit machines.  This sounds similar to the problem described in http://social.msdn.microsoft.com/Forums/en-US/vsunittest/thread/48baf9de-4c5b-4341-af20-bebd438e783c but there are no replies to that question.

    Monday, April 25, 2011 5:01 PM

Answers

All replies