title: Error 175: The specified store provider cannot be found in the configuration, or is not valid
body: <p>I just joined a project and installed Microsoft Visual Studio Professional 2012 Version 11.0.51106.01 and Microsoft SQL Server 2008 R2 on a 64-bit machine. </p>
  
  <p>Another team member is able to build the solution from his machine, but from my machine I get the following error:</p>
  
  <p>Error 175: The specified store provider cannot be found in the configuration, or is not valid</p>
  
  <p>In my .edmx file, all of the code between the <code>&lt;edmx:StorageModels&gt;&lt;/edmx:StorageModels&gt;</code> tags is marked for the error. The relevant snippet from the top of the file is: </p>
  
  <pre><code> &lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;edmx:Edmx Version="2.0" xmlns:edmx="http://schemas.microsoft.com/ado/2008/10/edmx"&gt;
    &lt;!-- EF Runtime content --&gt;
    &lt;edmx:Runtime&gt;
      &lt;!-- SSDL content --&gt;
      &lt;edmx:StorageModels&gt;
      &lt;Schema Namespace="[NAME].Store" Alias="Self" Provider="System.Data.SqlClient" ProviderManifestToken="2008" xmlns:store="http://schemas.microsoft.com/ado/2007/12/edm/EntityStoreSchemaGenerator" xmlns="http://schemas.microsoft.com/ado/2009/02/edm/ssdl"&gt;
  </code></pre>
  
  <p>In doing research on similar posts, others have suggested checking the DbProviderFactories in the machine.config file.</p>
  
  <p>C:\Windows\Microsoft.NET\Framework\v2.0.50727\CONFIG\machine.config</p>
  
  <pre><code>&lt;system.data&gt;
      &lt;DbProviderFactories&gt;
          &lt;add name="Odbc Data Provider" invariant="System.Data.Odbc" description=".Net Framework Data Provider for Odbc" type="System.Data.Odbc.OdbcFactory, System.Data, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"/&gt;
          &lt;add name="OleDb Data Provider" invariant="System.Data.OleDb" description=".Net Framework Data Provider for OleDb" type="System.Data.OleDb.OleDbFactory, System.Data, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"/&gt;
          &lt;add name="OracleClient Data Provider" invariant="System.Data.OracleClient" description=".Net Framework Data Provider for Oracle" type="System.Data.OracleClient.OracleClientFactory, System.Data.OracleClient, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"/&gt;
          &lt;add name="SqlClient Data Provider" invariant="System.Data.SqlClient" description=".Net Framework Data Provider for SqlServer" type="System.Data.SqlClient.SqlClientFactory, System.Data, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"/&gt;
          &lt;add name="Microsoft SQL Server Compact Data Provider" invariant="System.Data.SqlServerCe.3.5" description=".NET Framework Data Provider for Microsoft SQL Server Compact" type="System.Data.SqlServerCe.SqlCeProviderFactory, System.Data.SqlServerCe, Version=3.5.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91"/&gt;
    &lt;add name="Microsoft SQL Server Compact Data Provider 4.0" invariant="System.Data.SqlServerCe.4.0" description=".NET Framework Data Provider for Microsoft SQL Server Compact" type="System.Data.SqlServerCe.SqlCeProviderFactory, System.Data.SqlServerCe, Version=4.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91"/&gt;
  &lt;/DbProviderFactories&gt;
  &lt;/system.data&gt;
  </code></pre>
  
  <p>*<strong>Edit: Added the relevant DbProviderFactories for .Net 4.0</strong>
  C:\Windows\Microsoft.NET\Framework\v4.0.30319\Config</p>
  
  <pre><code>&lt;system.data&gt;
      &lt;DbProviderFactories&gt;
          &lt;add name="IBM DB2 for i5/OS .NET Provider" invariant="IBM.Data.DB2.iSeries" description=".NET Framework Data Provider for i5/OS" type="IBM.Data.DB2.iSeries.iDB2Factory, IBM.Data.DB2.iSeries, Version=12.0.0.0, Culture=neutral, PublicKeyToken=9cdb2ebfb1f93a26"/&gt;
          &lt;add name="Microsoft SQL Server Compact Data Provider" invariant="System.Data.SqlServerCe.3.5" description=".NET Framework Data Provider for Microsoft SQL Server Compact" type="System.Data.SqlServerCe.SqlCeProviderFactory, System.Data.SqlServerCe, Version=3.5.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91"/&gt;&lt;add name="Microsoft SQL Server Compact Data Provider 4.0" invariant="System.Data.SqlServerCe.4.0" description=".NET Framework Data Provider for Microsoft SQL Server Compact" type="System.Data.SqlServerCe.SqlCeProviderFactory, System.Data.SqlServerCe, Version=4.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91"/&gt;&lt;/DbProviderFactories&gt;
      &lt;DbProviderFactories/&gt;
  &lt;/system.data&gt;
  </code></pre>
  
  <p>Another guy on the team seems to recall this problem and it being associated with an iSeries configuration or setting in one of the updates to my Sql Server or Visual Studio install.</p>
  
  <p>Has anyone see this before or have an idea for fixing it so I can get a clean build?</p>
  
  <p><strong>ANSWER</strong></p>
  
  <pre><code>&lt;system.data&gt;
      &lt;DbProviderFactories&gt;
          &lt;add name="IBM DB2 for i5/OS .NET Provider" invariant="IBM.Data.DB2.iSeries" description=".NET Framework Data Provider for i5/OS" type="IBM.Data.DB2.iSeries.iDB2Factory, IBM.Data.DB2.iSeries, Version=12.0.0.0, Culture=neutral, PublicKeyToken=9cdb2ebfb1f93a26"/&gt;
          &lt;add name="Microsoft SQL Server Compact Data Provider" invariant="System.Data.SqlServerCe.3.5" description=".NET Framework Data Provider for Microsoft SQL Server Compact" type="System.Data.SqlServerCe.SqlCeProviderFactory, System.Data.SqlServerCe, Version=3.5.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91"/&gt;
          &lt;add name="Microsoft SQL Server Compact Data Provider 4.0" invariant="System.Data.SqlServerCe.4.0" description=".NET Framework Data Provider for Microsoft SQL Server Compact" type="System.Data.SqlServerCe.SqlCeProviderFactory, System.Data.SqlServerCe, Version=4.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91"/&gt;
      &lt;/DbProviderFactories&gt;
      &lt;DbProviderFactories/&gt;
  &lt;/system.data&gt;
  </code></pre>
  
  <p>When formatting my code I posted for my machine's configuration settings, I noticed there are two closing tags for <code>&lt;DbProviderFactories&gt;</code> I removed the <code>&lt;DbProviderFactories/&gt;</code> which we believe to have been added after the iSeries settings were added. After saving the file, I rebooted my machine and the build succeeded.</p>
  
  <p><strong>Side Note:</strong> My code did successfully build in VS 2010 without having to make this change.</p>