I am trying to go through the official Oracle Development and Deployment of a .NET Stored Function Demo for Oracle Extensions for .NET, however the "Oracle Project" Visual Studio template they refer to is nowhere to be found.
I tried to install the Oracle Developer Tools for Visual Studio 2017 (ODTforVS2017_183000.exe) on my Windows 10 development machine but this fails with an error saying that I must fix the issue in the specified log, uninstall and try again. However, the log file does not exist.
Next I tried to install it on my Windows Server 2012 R2 development VM. This seems to work but right at the end of the install I get an error dialog pop up, "There is no script engine for the file extension ".vbs".". Again, in Visual Studio, no "Oracle Project" template when trying the demo. After much Googling and trying many fixes (assoc .vbs=VBSFile, cscript.exe //H:WScript, Regsvr32 vbscript.dll, many registry hacks, etc. etc.), nothing worked and the error remains. Even resorted to trying to execute the Install.vbs (in "C:\Program Files (x86)\Oracle Developer Tools for VS2017\doc") from the command line as administrator but no luck.
Next tried to install the Oracle Developer Tools for Visual Studio 2015 (ODTforVS2015_183000.exe) on my Windows 10 development machine (yes still have 2015 installed) but this fails with the same error above, "There is no script engine for the file extension ".vbs"." I suspect that the error is the reason the "Oracle Project" template is missing.
So has anyone been able to successfully install Oracle Developer Tools for Visual Studio? Has anyone been able to to do the demo? In the end, I don't really care about the demo, I just want to know how to call a C# method in a .NET assembly from Oracle. Tried to Google a scripted way to do this but no luck. It must be script-able because that's how you would deploy it into production. It should be as simple as copying the assembly into the ORACLE_BASE\ORACLE_HOME\bin\CLR folder, run the SQL to create an external procedure (CREATE LIBRARY ..., GRANT EXECUTE ON) and create the wrapper PL/SQL stored procedure (CREATE OR REPLACE PROCEDURE ... AS EXTERNAL ...) but nowhere can I find a complete worked example.
Not sure if I am extremely frustrated or not but using Oracle on Windows always feels like using a square peg in a round hole, not meant to work together but if you use a big enough hammer you can make it work. Be that as it may, any help will be most appreciated.
The answer is: Do not install Oracle Oracle Extensions for .NET by themselves, (e.g. ODTforVS20xx_vvvvvv.exe), install Oracle Data Access Components (ODAC) with Oracle Developer Tools for Visual Studio, this worked for me. It seems that former just don't install properly (or are missing parts).
So having got it to install, I managed to make my first simple C# assembly (with the VS template project as per the documented demo) and deployed using the Oracle wizard. Then tried to call it: that is where the argument started. Had lots of issues, from additional privileges that were required to having reconfigure the listener, etc. Nothing I tried worked.
So I must say that I am disappointed. I have been using Oracle on Windows for over 15 years and could not get Oracle Extensions for .NET to work. It seems to be badly supported and full of bugs, I really cannot see anyone using this in a production environment. Best to leave .NET to do what .NET does best and leave Oracle to do what Oracle does best, never the two shall meet (well other than via ODP.NET that is).