This discussion is archived
9 Replies Latest reply: Nov 12, 2012 9:38 AM by Mark Williams-Oracle RSS

ODP.Net managed driver questions

929341 Newbie
Currently Being Moderated
I wish you success in developing of the ODP.Net managed driver and I have some questions:

1. After installation I found that assembly Oracle.ManagedDataAccess not shown in Visual Studio as others GAC assembies. Although, I see that assemblies present in my system:
c:\Windows\Microsoft.NET\assembly\GAC_MSIL\Oracle.ManagedDataAccess\v4.0_4.112.3.50__89b483f429c47342\Oracle.ManagedDataAccess.dll
c:\Windows\Microsoft.NET\assembly\GAC_32\Oracle.ManagedDataAccessDTC\v4.0_4.112.3.10__89b483f429c47342\oracle.manageddataaccessdtc.dll
So, I am unable to add reference from GAC. Is it normal?
2. machine.config was modified during registration process and new dbProvider added. Can I use it in Visual Studio? How? Can I create new dataset using this provider?
3. Using .Net Reflector I noticed, that library Oracle.ManagedDataAccess.dll have reference to Oracle.ManagedDataAccessDTC.dll. Does it means, that without this library it will not work?
4. Assembly is obfuscated using "SmartAssembly". What is the purpose of this? For example, Microsoft not using obfuscating for their assemblies, al least those, that using to connect to MS SQL database (as commercial as Oracle database).

My system: Windows7 x86, Visual Studio 2010 Pro.
  • 1. Re: ODP.Net managed driver questions
    Mark Williams-Oracle Employee ACE
    Currently Being Moderated
    Hi,

    1 & 2 - Please see the following note taken from the readme.htm filed supplied with the beta download:

    "Note: ODP.NET, Managed Driver is not supported to work with Oracle Developer Tools for .NET (ODT.NET)."

    3 - From the same readme.htm file:

    "Oracle.ManagedDataAccessDTC.dll is only needed if the application uses distributed transactions."

    4 - I will leave this to someone else to answer if they wish.
  • 2. Re: ODP.Net managed driver questions
    929341 Newbie
    Currently Being Moderated
    Thank you Mark for your reply.
    I also found usefull information about adding reference from GAC here: http://blog.paulhadfield.net/2011/01/accessing-gac-dlls-in-visual-studio.html
  • 3. Re: ODP.Net managed driver questions
    Mark Williams-Oracle Employee ACE
    Currently Being Moderated
    Hi,

    I think I misread a bit of your first question. I thought you were meaning that you could not select the provider for the data source in the dialog for the .NET Developer Tools. I see now that you mean just adding as a reference to the project. My apologies. On my local test system I have not registered the assembly in the GAC so I have just browsed to the file directly when adding a reference. In any case, it looks like you have a workable solution for that particular concern.

    If you are going to manually add an entry to the registry it may make more sense to put it under the correct framework version key.

    As an example:

    HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\.NETFramework\v4.0.30319\AssemblyFoldersEx

    Regards.
  • 4. Re: ODP.Net managed driver questions
    929341 Newbie
    Currently Being Moderated
    Well, I think that questions 1-3 are answered, thank you.
    Interesting, but I can't see the library in windows explorer (c:\windows\assembly) as others GAC-registered assemblies, I don't know why.
  • 5. Re: ODP.Net managed driver questions
    Mark Williams-Oracle Employee ACE
    Currently Being Moderated
    Have you checked the following location?

    C:\Windows\Microsoft.NET\assembly\GAC_MSIL

    EDIT1:

    Edited to change directory to GAC_MSIL

    Edited by: Mark Williams on Nov 12, 2012 12:21 PM
  • 6. Re: ODP.Net managed driver questions
    929341 Newbie
    Currently Being Moderated
    I mean, when I enter to the folder "c:\windows\assembly" using windows explorer, the content is displayed different from other folders (special shell extension is used for GAC). And Oracle.ManagedDataAccess.dll is not displayed in this folder view.
  • 7. Re: ODP.Net managed driver questions
    Mark Williams-Oracle Employee ACE
    Currently Being Moderated
    user10717262 wrote:
    I mean, when I enter to the folder "c:\windows\assembly" using windows explorer, the content is displayed different from other folders (special shell extension is used for GAC). And Oracle.ManagedDataAccess.dll is not displayed in this folder view.
    Yes, that's because for .NETFX 4 the GAC location is under %windir%\Microsoft.NET\assembly\ directory and not the %windir%\assembly\ directory.

    Oracle.ManagedDataAccess.dll targets .NETFX 4 and that is why I asked about the location above.

    So, depending on if you ran the configure file you should see the assembly under the .NETFX 4 GAC location.
  • 8. Re: ODP.Net managed driver questions
    929341 Newbie
    Currently Being Moderated
    Ok, I understood now, thank you. It's a pity, that for these foders shell extension not used. At least I don't see it.
  • 9. Re: ODP.Net managed driver questions
    Mark Williams-Oracle Employee ACE
    Currently Being Moderated
    Actually I should amend my previous statements a bit...

    The Oracle.ManagedDataAccess assembly is fully managed (of course!) so it would be in the MSIL directory under the %windir%\Microsoft.NET\assembly\GAC_MSIL directory rather than the GAC_32 or GAC_64 directories. Sorry about that. I've edited my previous reply with the correctly directory name.

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points