将dll添加到MVC6或使用旧的Web服务

时间:2016-01-07 17:35:35

标签: asp.net web-services asp.net-core-mvc

我需要引用一个dll来调用一个旧的Web服务(不是svc,而是旧的)。我不太清楚如何去做。我正在使用RC1版本。我可以直接调用Web服务,但我不知道如何在MVC6中执行此操作。

如果我直接添加dll,我会收到错误:

The name '*' does not exist in the current context
FieldOps.DNX Core 5.0

以下是我的project.json的哪个部分看起来像添加的库被称为“MyLibrary”:

  "frameworks": {
    "dnx451": {
      "frameworkAssemblies": {
        "System.Runtime.Serialization": "4.0.0.0",
        "System.ServiceModel": "4.0.0.0"
      },
      "dependencies": { "MyLibrary": "2.2.0" }
    },
    "dnxcore50": {
      "dependencies": {
        "System.Runtime.Serialization.Primitives": "4.1.0-beta-23516",
        "System.ServiceModel.Primitives": "4.1.0-beta-23516",
        "System.ServiceModel.Http": "4.0.11-beta-23516",
        "System.ServiceModel.NetTcp": "4.1.0-beta-23516",
        "System.ServiceModel.Duplex": "4.0.1-beta-23516",
        "System.ServiceModel.Security": "4.0.1-beta-23516",
        "System.Net.NameResolution": "4.0.0-beta-23516",
        "System.Net.Security": "4.0.0-beta-23516",
        "System.Security.Principal.Windows": "4.0.0-beta-23516",
        "System.Diagnostics.Tools": "4.0.1-beta-23516"
      }
    }
  },

0 个答案:

没有答案