Skip to content

CS0433 The type 'SqlMapper' exists in both 'Dapper.StrongName' and 'Dapper' #693

@tracker1

Description

@tracker1

I'm having trouble adding MiniProfiler to my existing project using Dapper.SqlBuilder.

Relevant Package References:

<PackageReference Include="Dapper" Version="2.1.66" />
<PackageReference Include="Dapper.SqlBuilder" Version="2.1.66" />
<PackageReference Include="MiniProfiler.AspNetCore.Mvc" Version="4.5.4" />
<PackageReference Include="MiniProfiler.Providers.SqlServer" Version="4.5.4" />

Getting the following error in several locations...

error CS0433: The type 'SqlMapper' exists in both 'Dapper.StrongName, Version=2.0.0.0, Culture=neutral, PublicKeyToken=e3e8412083d25dd3' and 'Dapper, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null' 

I cannot just switch to Dapper.StrongName as Dapper.SqlBuilder, which I'm using extensively is using plain 'Dapper' library reference.

Would it make sense to update MiniProfiler.Providers.SqlServer to reference the bare Dapper package instead, since this is what Dapper is now doing for their own package(s) it seems?

I have several uses of SqlMapper to handle thing like DateOnly, TimeOnly, Enum configuration and a few other use cases I needed. This is where things are blowing up.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions