RepoDB icon indicating copy to clipboard operation
RepoDB copied to clipboard

Bug: System.MissingMethodException: Method not found: Void RepoDb.DbSettingMapper.Add

Open stefandevo opened this issue 3 years ago • 4 comments

Bug Description

Assembly that referenced more than one provider. In my case:

<PackageReference Include="RepoDb.MySqlConnector" Version="1.1.5" />
<PackageReference Include="RepoDb.SqlServer" Version="1.1.3" />

Exception Message:

System.MissingMethodException: Method not found: 'Void RepoDb.DbSettingMapper.Add(System.Type, RepoDb.Interfaces.IDbSetting, Boolean)'.
   at RepoDb.SqlServerBootstrap.Initialize()

Upon calling the RepoDb.SqlServerBootstrap.Initialize() call it fails. If I remove the RepoDb.MySqlConnector reference it works.

We have multiple databases we want to use; how to make this work?

stefandevo avatar Mar 01 '22 19:03 stefandevo

Is it a big change for you to upgrade to the latest version of RepoDb.SqlServer? If not, then, just simply and it will work.

    <PackageReference Include="RepoDb.MySqlConnector" Version="1.1.5" />
    <PackageReference Include="RepoDb.SqlServer" Version="1.1.5" />

mikependon avatar Mar 01 '22 20:03 mikependon

I will just put a tag as we will not issue a fix for this anymore. The main codebase is to far from the version 1.1.3 already. Looking forward for you to upgrade to the latest version.

mikependon avatar Mar 01 '22 21:03 mikependon

I can't because of https://github.com/dotnet/SqlClient/issues/1402 You are now using Microsoft.Data.SqlClient which is causing SSL issues in 4.x on Mac.

stefandevo avatar Mar 02 '22 06:03 stefandevo

For now, this combination works

 <PackageReference Include="RepoDb.MySqlConnector" Version="1.1.4" />
    <PackageReference Include="RepoDb.SqlServer" Version="1.1.4" />
    <PackageReference Include="RepoDb.SqlServer.BulkOperations" Version="1.1.5" />

stefandevo avatar Mar 02 '22 07:03 stefandevo