Question

I'm using Visual Studio 2013 Pro, Dapper.Net 1.13 thru nuget package

I am trying to debug an issue I am having with getting data from a stored proc over into a few nested lists using Dapper.Net. Everything works at run time. But not all the data that I am expecting is loaded into the object. So I am trying to run down what is going on during the loading that might cause this.

When I step through the code and step into a Dapper call (ie. newing up a DynamicParameter variable) I get a screen stating "SqlMapper.cs not found" followed by "You need to find SqlMapper.cs to view the source for the current call stack frame". It states that it is looking for the file at "c:\Dev\Dapper\Dapper NET40\SqlMapper.cs" which does not exist. If I hit F11 then it will progress but it will only move away from the "SqlMapper.cs not found" screen and back into the code when the line does not call to Dapper.

I originally loaded Dapper.Net 1.13 into the project through Nuget. I checked the package and there is not a copy of SqlMapper.cs included.

I copied the file down from the github repo and pointed VS to that file. To which it told me "The source file is different from when the module was built. Would you like the debugger to use it anyway?" If I respond yes then it steps through the file but the lines being highlighted do not match with what the debugger is doing.

So how can I step into the Dapper calls and follow what is happening? Is there a place I can find the SqlMapper.cs file that was used in the Nuget package? Or a simpler way around this situation that I am missing? Maybe this isn't a Dapper issue as much as it might be something to be changed in Visual Studio settings?

Was it helpful?

Solution 2

I was having the same problem after installing dapper.net from Nuget.

I ended up downloading the SqlMapper.cs file directly from github and including it in my project and uninstalling the nuget package. No problems since.

OTHER TIPS

You have install dapper.

You need to install Dapper.SimpleCRUD from Nugets and it will work fine I was facing same issue.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top