我有64位Windows 7。 我试图用火鸟VS 2010中。
我得到以下错误:
无法找到或加载注册.NET Framework数据提供。
我已经做了以下
- 安装 “NETProvider-2.6.5.msi”
- 提取“FirebirdDDEXProvider-2.0.5.zip”
我复制.dll文件的从DDEX zip文件的目录C:\ Program Files文件(x86)的\ FirebirdClient其内容是:
FirebirdSql.Data.FirebirdClient.dll
FirebirdSql.Data.UnitTests.dll
FirebirdSql.VisualStudio.DataTools.dll
FirebirdSql.VisualStudio.DataToolsUI.dll
我编辑从DDEX 2个REG文件,以取代“%PATH%” “C:\ Program Files文件(x86)的\ FirebirdClient”
从目录 “C:\ Program Files文件(x86)的\微软的SDK \的Windows \ v7.0A \ BIN \ NETFX 4.0工具” 我已运行GACUTIL,如下
cd "C:\Program Files (x86)\FirebirdClient"
"C:\Program Files\Microsoft SDKs\Windows\v7.0A\bin\NETFX 4.0 Tools\gacutil.exe" /i FirebirdSql.VisualStudio.DataTools.dll
"C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\bin\NETFX 4.0 Tools\gacutil.exe" /i FirebirdSql.Data.FirebirdClient.dll
我不能用其他的GACUTIL,因为它说,这是对以前版本的建造。
我也运行
"C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\bin\NETFX 4.0 Tools\gacutil.exe" /l Firebirdsql.data.firebirdclient
这给了我:
The Global Assembly Cache contains the following assemblies:
Firebirdsql.data.firebirdclient, Version=2.6.5.0, Culture=neutral, PublicKeyToken=3750abcc3150b00c, processorArchitecture=MSIL
从目录C:\ WINDOWS \ Microsoft.NET我已经修改了以下4个文件:
\Framework\v4.0.30319\Config\machine.config
\Framework\v2.0.50727\Config\machine.config
\Framework64\v2.0.50727\Config\machine.config
\Framework64\v4.0.30319\Config\machine.config
在这些文件中,我已经添加了以下2项
<configuration>
<configSections>
<section name="FirebirdSql.Data.FirebirdClient" type="System.Data.Common.DbProviderConfigurationHandler, System.Data, Version=2.6.5.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
</configSections>
</configuration>
<system.data>
<DbProviderFactories>
<add name="Firebird Client Data Provider" invariant="FirebirdSql.Data.FirebirdClient" description=".Net Framework Data Provider for Firebird" type="FirebirdSql.Data.FirebirdClient.FirebirdClientFactory, FirebirdSql.Data.FirebirdClient, Version=2.6.5.0, Culture=neutral, PublicKeyToken=3750abcc3150b00c" />
</DbProviderFactories>
</system.data>
这一切后,我还是不能让火鸟工作withing视觉工作室。 我可以从服务器资源管理器中查看数据库及表,但是我不能添加一个数据源,在完成步骤,它给出了一个错误:
“在创建新的数据源时出现错误:无法获取类型信息‘WinFormsApp.DataSet1’。
作为一个更好的例子,使用DbProviderFactory,火鸟是第五指数,我运行下面的代码:
try
{
DataTable dt = DbProviderFactories.GetFactoryClasses();
// Use this for loop to see what row holds FirebirdClient
for (int i = 0; i < dt.Rows.Count; i++)
Console.WriteLine("{0}: {1}", i.ToString(), dt.Rows[i][2].ToString());
// For me, FirebirdClient is at row 5
DbProviderFactory dataFactory = DbProviderFactories.GetFactory(dt.Rows[5]);
出现以下情况除外:
无法找到或加载注册.NET Framework数据提供。
例外:
System.Configuration.ConfigurationErrorsException was caught
Message=Failed to find or load the registered .Net Framework Data Provider.
Source=System.Data
BareMessage=Failed to find or load the registered .Net Framework Data Provider.
Line=0
StackTrace:
at System.Data.Common.DbProviderFactories.GetFactory(DataRow providerRow)
at Forms.TestForm.TestConn() in C:\Data\Projects\Dev\FirebirdTest\Forms\TestForm.cs:line 113
InnerException: null
任何人都可以请协助。