Problems with RavenDB.Client reference in asp.net 5.0 project.json

♀尐吖头ヾ 提交于 2019-11-29 14:58:17

The problem is that you referencing RavenDB.Client in the top level dependencies node in project.json. That means that those dependencies are applicable to both Desktop CLR (aspnet50) and CoreCLR (aspnetcore50).

When you build an ASPNET 5 project, all configurations are built, not just the "active" one. Mostly sure RavenDB.Client works only with the Desktop CLR so move it under a dependencies node under that configuration.

"dependencies": {
    "Microsoft.AspNet.Server.IIS": "1.0.0-beta2",
    "Microsoft.AspNet.Diagnostics": "1.0.0-beta2",
    "Microsoft.AspNet.Mvc": "6.0.0-beta2",
    "SharedIOModel": "1.0.0-*"
},
"frameworks": {
    "aspnet50": {
        "dependencies" : {
            "RavenDB.Client": "3.0.3599",
        }
    },
    "aspnetcore50": {}
}

Then you might have to either use some conditional blocks in your code (#if ASPNET50) or remove CoreCLR all together.

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