2

We are using ODP.NET and we need to refer to the Oracle.DataAccess.dll in our project.json.

Unfortunately, not all developers on our team have ODP.NET installed to the same path, but we do have an environment variable which tells the location of the installation. In MSBuild we can use environment variables as part of the path, can this be done with dnx/dotnetcli?

So we have this:

"frameworks": {
    "dnx451": {
        "dependencies": {
            "xunit.runner.visualstudio": "2.2.0-beta1-build1144",
            "xunit.runner.console": "2.1.0-rc1-build3168"
        },
        "bin": {
            "assembly": "c:\\oracle64\\product\\11.2.0\\client_1\\odp.net\\bin\\4\\Oracle.DataAccess.dll"
        }
    }
},

But can we do something like the following:

"frameworks": {
    "dnx451": {
        "dependencies": {
            "xunit.runner.visualstudio": "2.2.0-beta1-build1144",
            "xunit.runner.console": "2.1.0-rc1-build3168"
        },
        "bin": {
            "assembly": "${ODP_NET_PATH}"
        }
    }
},
Damian
  • 2,709
  • 2
  • 29
  • 40

1 Answers1

0

Can you not put that dll into the bin folder of the project and the project then could use that as a reference? That way, the path should be same for all developers

Ashraf Iqbal
  • 412
  • 3
  • 11
  • We've had instances where when we did this we ended up with a version of ODP.NET that didn't match the version of Oracle Client (native DLLs) on the server. That being said, we could try this, we mainly ran into issues when we used the assembly at runtime, if this DLL is only used at compile time it could work. – Damian Mar 01 '16 at 20:19