ADO.Net在Asp.Net 5 [英] ADO.Net in Asp.Net 5

查看:86
本文介绍了ADO.Net在Asp.Net 5的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我在一个ASP.Net 5应用程序中使用的连接字符串生成器我得到这个错误:

When I use connection string builder in an ASP.Net 5 application I get this error:

错误CS0012类型DbConnectionStringBuilder'是在定义
  未引用的程序集。您必须添加到程序集的引用
  System.Data这,版本= 4.0.0.0,文化=中立,
  公钥= b77a5c561934e089'。

Error CS0012 The type 'DbConnectionStringBuilder' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.Data, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'.

我使用dnx451为骨架,任何建议吗?

I'm using dnx451 as the framework, any sugestions?

推荐答案

例project.json

Example project.json

"frameworks": {
        "dnx451": {
            "frameworkAssemblies": {
                "System.Data": "4.0.0.0"
            }
        },
        "dnxcore50": {
            "dependencies": {
                "System.Data.SqlClient": "4.0.0-beta-*"
            }
        }
    }

这篇关于ADO.Net在Asp.Net 5的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆