I. Installation of Oracle Developer Tools for Visual Studio 2015
The other client does not install, installed the direct uninstall.
You need to log in when downloading, if you have already registered an account, remind me that password rules need to include both uppercase and lowercase letters and numbers.
Second, modify the Tnsnames.ora file configuration database server
This file is located in the installation directory \network\admin directory, generally only need to modify 4 places: Service Alias, host name (or IP), port number, service name (generally ORCL)
Iii. adding assembly references for. NET projects
Opening VS2015 will find that there are some Oracle-related items in the Tools menu, but this is not the point, and there is no such menu item in VS2017, but it has no effect.
New or open a project, right-click on the reference to add a reference, in the popup dialog box, select "assembly" \ "extension", enter Oracle in the search box, select Oracle.managedataaccess.
Iv. Writing test Code
usingSystem;usingOracle.ManagedDataAccess.Client;//referencing the namespace where the OracleConnection class residesnamespaceoracledemo{Static classProgram {Static voidMain () {using(varConnection =NewOracleConnection ("Data source=test; Persist Security info=true; User Id=user; password=123456;") {connection. Open (); Console.WriteLine ("connection Success!!! "); } console.readline (); } }}
Visual Studio connects to the Oracle database