Add dll to MVC6 or use old web service

可紊 提交于 2019-12-11 12:48:23

问题


I need to reference a dll which calls an old web service (not svc, but the older one). I'm not quite sure how to go about doing that. I'm using the RC1 version. I could call the web service directly but I'm not sure how to do that either in MVC6.

If I add the dll directly I get the error:

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

Here's what part of my project.json looks like where the library added is called "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"
      }
    }
  },

来源:https://stackoverflow.com/questions/34661624/add-dll-to-mvc6-or-use-old-web-service

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!