Tip Visual Studio 2010 SQL Compact 3.5 Issues on Vista/7 - Resolved!

struct

New member
Joined
Feb 20, 2012
Messages
1
Programming Experience
10+
Ok,

So from what I've read on the internet this is a wide-spread problem. I've looked everywhere and found out why this happens and here's how to fix it.
  1. Print this page.
  2. Restart your computer.
  3. Before the Windows Loading screen, press F8 to access the boot menu.
    1. Choose "Safe Mode" and press "Enter"
  4. Open Windows Explorer and go to this directory:
    C:\Windows\Microsoft.NET\Framework\vXXXXXX\Config (vXXXXXX will probably be something like v4.0.30319)
  5. Right-Click on machine.config and select "Open With..."
    1. Uncheck "Always use..."
    2. Select "Notepad"
  6. Scroll down the file until you find this node:
    C#:
    <DbProviderFactories>
       <node...>
       <node...>
       <node...>
    </DbProviderFactories>
    <DbProviderFactories>
       <some other node...>
       <some other node...>
    </DbProviderFactories>

    So here's what's going on here. The file has two <DbProviderFactories> nodes!
  7. Select the closeing tag for the first node and the opening for the second and delete it.
    C#:
    <DbProviderFactories>
       <node...>
       <node...>
       <node...>
    [B]</DbProviderFactories>
    <DbProviderFactories>[/B]
       <some other node...>
       <some other node...>
    </DbProviderFactories>
  8. There may be one other thing going on here if you have a Borland or CodeGear product installed on your machine. Make sure there are no duplicate Blackfish entries because this will cause another error that stops you from making a database connection to a Compact SQL file in Visual Studio 2010.

    I hope this has helped you. I just didn't want anyone else to have to go through all I did to resolve this issue!
 

Latest posts

Back
Top Bottom