IBM Support

75 ways to demystify DB2 #61: Techtip :Register Visual Studio Add-Ins for DB2.

Technical Blog Post


Abstract

75 ways to demystify DB2 #61: Techtip :Register Visual Studio Add-Ins for DB2.

Body

 

Are you getting the following error when you try to register Visual Studio Add-Ins for DB2?

"An error occurred while modifying IBM Data server provider for .NET FW 4.0 registry keys. Contact technical support team."

image

 

 

 

 

 

 

 

 

 

 

Here are the tips to resolve this issue:

1) Check the VSAI logs created under:

C:\Users\<USER>\appdata\Roaming\IBM\vsnet2010 

If it has the following entries at the end:

The 'DbProviderFactories' section can only appear once per config file.

 

2) Check your machine.config: Check if it has any extra entries for <DbProviderFactories/> in it:

Here is a sample machine.config with the extra entry : <DbProviderFactories/>
---------------------------------------------------
<system.data>
       <DbProviderFactories>
           <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"/>
           <add name="IBM DB2 .NET Data Provider 10.5.5" invariant="IBM.Data.DB2.10.5.5" description="IBM DB2 Data Provider10.5.5 for .NET Framework 4.0" type="IBM.Data.DB2.DB2Factory,
IBM.Data.DB2.10.5.5, Version=10.5.5.4, Culture=neutral, PublicKeyToken=7c307b91aa13d208"/>
           <add name="IBM Informix .NET Data Provider 10.5.5" invariant="IBM.Data.Informix.10.5.5" description="IBM Informix Data Provider 10.5.5 for .NET Framework 4.0" type="IBM.Data.Informix.IfxFactory, IBM.Data.Informix.10.5.5,
Version=10.5.5.4, Culture=neutral, PublicKeyToken=7c307b91aa13d208"/>
           <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.1.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91"/>

</DbProviderFactories>
       <DbProviderFactories/>
   </system.data>

----------------------------------------------------

The issue is explained here in MS-Forum.

 

To Resolve:

After taking a backup of existing machine.config files under both 32 bit and 64 bit Framework locations, remove the extra entry <DbProviderFactories/> from the files and save.

C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Config\machine.config
C:\Windows\Microsoft.NET\Framework\v4.0.30319\Config\machine.config

and now register VSAI again.

(Please note: Machine.config is a system-Wide file and be cautious when you modify the file)

The above steps should resolve the issue.

Thanks for reading. Please do post your feedback/comments.

- Subbu Prabhu

 

[{"Business Unit":{"code":"BU058","label":"IBM Infrastructure w\/TPS"},"Product":{"code":"SSEPGG","label":"Db2 for Linux, UNIX and Windows"},"Component":"","Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"","Edition":"","Line of Business":{"code":"LOB10","label":"Data and AI"}}]

UID

ibm11140934