2

我们正在使用 ODP.NET,我们需要在 project.json 中引用 Oracle.DataAccess.dll。

不幸的是,并非我们团队中的所有开发人员都将 ODP.NET 安装到相同的路径,但我们确实有一个环境变量来告知安装位置。在 MSBuild 中,我们可以使用环境变量作为路径的一部分,这可以通过 dnx/dotnetcli 完成吗?

所以我们有这个:

"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"
        }
    }
},

但是我们可以做如下的事情吗:

"frameworks": {
    "dnx451": {
        "dependencies": {
            "xunit.runner.visualstudio": "2.2.0-beta1-build1144",
            "xunit.runner.console": "2.1.0-rc1-build3168"
        },
        "bin": {
            "assembly": "${ODP_NET_PATH}"
        }
    }
},
4

1 回答 1

0

你能不把那个dll放到项目的bin文件夹中,然后项目可以用它作为参考吗?这样,所有开发人员的路径都应该相同

于 2016-03-01T19:38:11.577 回答