Building C# from command line and referencing Oracle ODP.Net

M

Matthew Houseman

Can anyone tell me what the /reference: should be and what the using
directive in the C# should be to build C# code integrated with
ODP.Net?

I'm having no joy with the following:
$ csc -debug /reference:Oracle.DataAccess.dll foo.cs

There is a Global Assembly Name of Oracle.DataAccess in the Assembly
folder which points to C:/oracle/ora92/bin/Oracle.DataAccess.dll and
lastly, C:/oracle/ora92/bin is in my path.

Please help me.

Thanks,
Matt Houseman
 
S

Steven Bras [MS]

You might try using the /lib option to specify the path to the Oracle DLL,
as in:

csc /lib:c:\ /reference:t2.dll t2.cs

Hope this helps.

Steven Bras, MCSD
Microsoft Developer Support/Data Access Technologies

This posting is provided "AS IS" with no warranties, and confers no rights.

Microsoft Security Announcement: Have you installed the patch for Microsoft
Security Bulletin MS03-026?  If not Microsoft strongly advises you to
review the information at the following link regarding Microsoft Security
Bulletin MS03-026
http://www.microsoft.com/security/security_bulletins/ms03-026.asp and/or to
visit Windows Update at http://windowsupdate.microsoft.com to install the
patch. Running the SCAN program from the Windows Update site will help to
insure you are current with all security patches, not just MS03-026.
 
M

Matthew Houseman

Yep, that did the trick for the compile.

FYI, for those of you out there who may attempt to do the same (syntax
is for GNU make from Bash shell):
Search_Customer_By_Email.exe : Search_Customer_By_Email.cs
csc -debug /lib:C:\\oracle\\ora92\\bin
/reference:Oracle.DataAccess.dll $<

Regards,
Matt Houseman
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top