Today, I uninstalled SA from my development machine & reinstalled it with both the 32-bit & 64-bit database engines turned on.

I go into C:\Progeram Files\SQL Anywhere 12\Assembly\V4 and run SetupVSPackage /I /v 4

I start VS & build my application. When I run it, I keep getting this error over & over:

Failed to find or load the registered .Net Framework Data Provider.

When I look at my machine.config in C:\Windows\Microsoft.NET\Framework\v4.0.30319\Config, I have this line in the DbProviderFactories section:

<add name="SQL Anywhere 12 Data Provider" invariant="iAnywhere.Data.SQLAnywhere" description=".Net Framework Data Provider for SQL Anywhere 12" type="iAnywhere.Data.SQLAnywhere.SAFactory, iAnywhere.Data.SQLAnywhere.v4.0, Version=12.0.1.38954, Culture=neutral, PublicKeyToken=f222fc4333e0d400" />

and this line is in the C:\Windows\Microsoft.Net\Framework64\v4.0.30319\Config\machine.config

<add name="SQL Anywhere 12 Data Provider" invariant="iAnywhere.Data.SQLAnywhere" description=".Net Framework Data Provider for SQL Anywhere 12" type="iAnywhere.Data.SQLAnywhere.SAFactory, iAnywhere.Data.SQLAnywhere.v4.0, Version=12.0.1.38954, Culture=neutral, PublicKeyToken=f222fc4333e0d400" />

Finally, this line is in the App.config for my application:

<add invariant="iAnywhere.Data.SQLAnywhere"
     name="SQL Anywhere 12 Data Provider"
     description=".Net Framework Data Provider for SQL Anywhere 12"
     type="iAnywhere.Data.SQLAnywhere.SAFactory, iAnywhere.Data.SQLAnywhere.v4.0" />

It doesn't matter if I have the 32-bit or the 64-bit server running, I get the same message. This all worked before I uninstalled SA & reinstalled it. What is wrong with my configuration and how do I fix it?

asked 22 Aug '14, 16:33

TonyV's gravatar image

TonyV
1.2k333967
accept rate: 75%

edited 22 Aug '14, 16:33


I found the problem.

Another developer modified the references & the location where the SA dlls are in the project, and when he did, the references to the SA DLLs in the projects that use them had Copy Local in the reference properties set to False. I changed Copy Local to True and the code ran fine.

permanent link

answered 22 Aug '14, 16:47

TonyV's gravatar image

TonyV
1.2k333967
accept rate: 75%

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×56

question asked: 22 Aug '14, 16:33

question was seen: 475 times

last updated: 22 Aug '14, 16:47