Dapper Method not found exception

c# dapper

Question

using (var conn = _config.OpenConnection())
            {
                var p = new DynamicParameters();
                p.Add("@playerName",playerName);

It worked previously in earlier versions well but last dapper version 1.40.0.0 returns strange error :

Result Message: Test method DupGames.Database.DbAccess.Tests.BlackjackDbTests.SelectNewDealTest threw exception: System.MissingMethodException: Method not found: 'Void Dapper.DynamicParameters.Add(System.String, System.Object, System.Nullable1<System.Data.DbType>, System.Nullable1, System.Nullable1<Int32>, System.Nullable1, System.Nullable`1)'.

Accepted Answer

The problem occured due to the version mismatch.

Thanks


Popular Answer

For the benefit of others finding this via Google: it's possible that you have a static property in your model. See this bug for details.



Licensed under: CC-BY-SA with attribution
Not affiliated with Stack Overflow
Is this KB legal? Yes, learn why
Licensed under: CC-BY-SA with attribution
Not affiliated with Stack Overflow
Is this KB legal? Yes, learn why