Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialAndras Somodi
9,229 PointsAn unhandled exception of type 'System.NotSupportedException' occurred in EntityFramework.dll
"Additional information: Unable to determine the provider name for provider factory of type 'System.Data.SqlClient.SqlClientFactory'. Make sure that the ADO.NET provider is installed or registered in the application config."
I have MSSSQLLocalDB installed, so what am I missing?
1 Answer
Steven Parker
231,248 PointsCongratulations on resolving your issue.
That was a tricky one!
Andras Somodi
9,229 PointsAndras Somodi
9,229 PointsI managed to solve this for myself, but since this might come up for others I will briefly explain how. It probably has to do with having other Database managers on your windows installed in my case MySql for example. This messes with the machine.config file in your Windows\Microsoft.NET\Framework64 and Windows\Microsoft.NET\Framework folders when you install visual studio. In these files (I had 2 in each folder) wrong xml tags might be generated like this:
<system.data> <DbProviderFactories> <add name="IBM DB2 for i .NET Provider" invariant="IBM.Data.DB2.iSeries" description=".NET Framework Data Provider for IBM i" type="IBM.Data.DB2.iSeries.iDB2Factory, IBM.Data.DB2.iSeries, Version=12.0.0.0, Culture=neutral, PublicKeyToken=9cdb2ebfb1f93a26"/>
</system.data>
Notice that there is an additional <DbProviderFactories/> tag at the end. I removed these from all files. I also removed the line for MySQL since I do not use that anymore, although I do not know which change actually solved the problem. It works now.