ORCAS March CTP Db Providers Problem
I had a weird problem today in my working machine, I have .net 3.0, VS 2005, Sql Server 2005 Client tools, and I decided to give VS Orcas a try, so
Meligy downloaded the bits from microsoft (VS Orcas March CTP), and I install it, and two days later I found out that Sql Server gives me this exception when I try to access database object (table, view, diagram ... etc)
TITLE: Microsoft SQL Server Management Studio
------------------------------
Exception has been thrown by the target of an invocation. (SQLEditors)
------------------------------
ADDITIONAL INFORMATION:
An error occurred creating the configuration section handler for
system.data: Column 'InvariantName' is constrained to be unique. Value
'Microsoft.SqlServerCe.Client' is already present.
(C:\Windows\Microsoft.NET\Framework\v2.0.50727\Config\machine.config
line 128) (System.Configuration)
------------------------------
Column 'InvariantName' is constrained to be unique. Value 'Microsoft.SqlServerCe.Client' is already present. (System.Data)
which is just some bla bla bla, I felt that the Orcas installation made some bullshit with my machine.config file, so I Google it up and I found this
http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=1140585&SiteID=1Which says go to your machine.config (C:\Windows\Microsoft.net\Framework\
v2.0.50727\Config\machine.config) and go through the file until you find the
<DbProviderFactories>
Then comment these two lines
<add name="SQL Server CE Data Provider" invariant="Microsoft.SqlServerCe.Client" description=".NET Framework Data Provider for Microsoft SQL Server 2005 Mobile Edition" type="Microsoft.SqlServerCe.Client.SqlCeClientFactory,
Microsoft.SqlServerCe.Client, Version=9.0.242.0, Culture=neutral,
PublicKeyToken=89845dcd8080cc91" />
<add name="SQL Server Everywhere Client Data Provider" invariant="Microsoft.SqlServerCe.Client" description=".NET Framework Data Provider for Microsoft SQL Server Everywhere Edition Client" type="Microsoft.SqlServerCe.Client.SqlCeClientFactory,
Microsoft.SqlServerCe.Client, Version=3.5.0.0, Culture=neutral,
PublicKeyToken=89845dcd8080cc91" />
Then everything will work well
Thanks Microsoft for the great deployment plan that cost me an hour to solve