Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

The namespace name Infrastructure does not exist in a namespace system.data.entity

Tags:

.net

I am getting an error message when using infrastructure namespace in system.data.entity namespace

like image 649
user1635479 Avatar asked Nov 27 '12 03:11

user1635479


3 Answers

You also need a reference to the EntityFramework, or you will get the same error.

like image 155
Gerard Avatar answered Nov 07 '22 12:11

Gerard


You need to add a reference to the .NET assembly System.Data.Entity.dll.

like image 38
Ravindra Bagale Avatar answered Nov 07 '22 14:11

Ravindra Bagale


I had a similar problem. I made a reference to System.Data.Entity but it was complaining about System.Data.Entity.Infrastructure. The solution was to add the EntityFramework nuget. Once it's installed it actually removes the original System.Data.Entity reference and points to a new DLL that includes System.Data.Entity and System.Data.Entity.Infrastructure.

like image 4
Chad Kuehn Avatar answered Nov 07 '22 14:11

Chad Kuehn