7

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

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'.

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

Tiny
  • 27,221
  • 105
  • 339
  • 599
user2070369
  • 3,970
  • 6
  • 22
  • 32

1 Answers1

9

Example project.json

"frameworks": {
        "dnx451": {
            "frameworkAssemblies": {
                "System.Data": "4.0.0.0"
            }
        },
        "dnxcore50": {
            "dependencies": {
                "System.Data.SqlClient": "4.0.0-beta-*"
            }
        }
    }
Kiran
  • 56,921
  • 15
  • 176
  • 161